summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_attrib_tmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/vbo/vbo_attrib_tmp.h')
-rw-r--r--src/mesa/vbo/vbo_attrib_tmp.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index 5718ac5a092..126e4ef0d6e 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -524,15 +524,18 @@ TAG(MultiTexCoord4fv)(GLenum target, const GLfloat * v)
/**
* 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);
+ return (index == 0 &&
+ _mesa_attr_zero_aliases_vertex(ctx) &&
+ _mesa_inside_begin_end(ctx));
}
-
static void GLAPIENTRY
TAG(VertexAttrib1fARB)(GLuint index, GLfloat x)
{