if (ctx->NewState)
_mesa_update_state(ctx);
- /* Always need vertex positions */
- if (!ctx->Array.ArrayObj->Vertex.Enabled
- && !(ctx->VertexProgram._Enabled
- && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
+ /* Always need vertex positions, unless a vertex program is in use */
+ if (!ctx->VertexProgram._Current &&
+ !ctx->Array.ArrayObj->Vertex.Enabled &&
+ !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
return GL_FALSE;
/* Vertex buffer object tests */
if (ctx->NewState)
_mesa_update_state(ctx);
- /* Always need vertex positions */
- if (!ctx->Array.ArrayObj->Vertex.Enabled
- && !(ctx->VertexProgram._Enabled
- && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
+ /* Always need vertex positions, unless a vertex program is in use */
+ if (!ctx->VertexProgram._Current &&
+ !ctx->Array.ArrayObj->Vertex.Enabled &&
+ !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
return GL_FALSE;
/* Vertex buffer object tests */
if (ctx->NewState)
_mesa_update_state(ctx);
- /* Always need vertex positions */
- if (!ctx->Array.ArrayObj->Vertex.Enabled
- && !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
+ /* Always need vertex positions, unless a vertex program is in use */
+ if (!ctx->VertexProgram._Current &&
+ !ctx->Array.ArrayObj->Vertex.Enabled &&
+ !ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
return GL_FALSE;
if (ctx->Const.CheckArrayBounds) {