mesa: Correct the is_vertex_position decision for dlists.
We have to use _mesa_inside_dlist_begin_end instead of _mesa_inside_begin_end to see if we are inside a glBegin/glEnd block in case of display lists. So split the is_vertex_position function used in vertex attribute processing into a imm and dlist variant and use the appropriate _mesa_inside_begin_end variant. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
@@ -457,6 +457,20 @@ vbo_exec_begin_vertices(struct gl_context *ctx)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If index=0, does glVertexAttrib*() alias glVertex() to emit a vertex?
|
||||
* It depends on a few things, including whether we're inside or outside
|
||||
* of glBegin/glEnd.
|
||||
*/
|
||||
static inline bool
|
||||
is_vertex_position(const struct gl_context *ctx, GLuint index)
|
||||
{
|
||||
return (index == 0 &&
|
||||
_mesa_attr_zero_aliases_vertex(ctx) &&
|
||||
_mesa_inside_begin_end(ctx));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This macro is used to implement all the glVertex, glColor, glTexCoord,
|
||||
* glVertexAttrib, etc functions.
|
||||
|
Reference in New Issue
Block a user