/**************************************************************************
*
- * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2007 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "vbo/vbo.h"
-#if FEATURE_rastpos
-
/**
* Our special drawing pipeline stage (replaces rasterization).
*/
};
-static INLINE struct rastpos_stage *
+static inline struct rastpos_stage *
rastpos_stage( struct draw_stage *stage )
{
return (struct rastpos_stage *) stage;
/* update other raster attribs */
update_attrib(ctx, outputMapping, prim->v[0],
ctx->Current.RasterColor,
- VERT_RESULT_COL0, VERT_ATTRIB_COLOR0);
+ VARYING_SLOT_COL0, VERT_ATTRIB_COLOR0);
update_attrib(ctx, outputMapping, prim->v[0],
ctx->Current.RasterSecondaryColor,
- VERT_RESULT_COL1, VERT_ATTRIB_COLOR1);
+ VARYING_SLOT_COL1, VERT_ATTRIB_COLOR1);
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
update_attrib(ctx, outputMapping, prim->v[0],
ctx->Current.RasterTexCoords[i],
- VERT_RESULT_TEX0 + i, VERT_ATTRIB_TEX0 + i);
+ VARYING_SLOT_TEX0 + i, VERT_ATTRIB_TEX0 + i);
}
if (ctx->RenderMode == GL_SELECT) {
rs->stage.destroy = rastpos_destroy;
rs->ctx = ctx;
- for (i = 0; i < Elements(rs->array); i++) {
+ for (i = 0; i < ARRAY_SIZE(rs->array); i++) {
rs->array[i].Size = 4;
rs->array[i].Type = GL_FLOAT;
rs->array[i].Format = GL_RGBA;
struct st_context *st = st_context(ctx);
struct draw_context *draw = st->draw;
struct rastpos_stage *rs;
+ const struct gl_client_array **saved_arrays = ctx->Array._DrawArrays;
if (st->rastpos_stage) {
/* get rastpos stage info */
*/
rs->array[0].Ptr = (GLubyte *) v;
- /* draw the point */
- st_feedback_draw_vbo(ctx, rs->arrays, &rs->prim, 1, NULL, GL_TRUE, 0, 1);
+ /* Draw the point.
+ *
+ * Don't set DriverFlags.NewArray.
+ * st_feedback_draw_vbo doesn't check for that flag. */
+ ctx->Array._DrawArrays = rs->arrays;
+ st_feedback_draw_vbo(ctx, &rs->prim, 1, NULL, GL_TRUE, 0, 1,
+ NULL, NULL);
+ ctx->Array._DrawArrays = saved_arrays;
/* restore draw's rasterization stage depending on rendermode */
if (ctx->RenderMode == GL_FEEDBACK) {
{
functions->RasterPos = st_RasterPos;
}
-
-#endif /* FEATURE_rastpos */