fix GL_CURRENT_VERTEX_ATTRIB_ARB queries
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 10 Jun 2003 14:56:40 +0000 (14:56 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 10 Jun 2003 14:56:40 +0000 (14:56 +0000)
src/mesa/main/arbprogram.c
src/mesa/main/nvprogram.c

index 5cc451e8bb71036ac999164f53b394fd5d35e511..54715e20b35ebd5cf1f163e969c216753b70ffe9 100644 (file)
@@ -142,6 +142,7 @@ _mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params)
          params[0] = ctx->Array.VertexAttrib[index].Normalized;
          break;
       case GL_CURRENT_VERTEX_ATTRIB_ARB:
+        FLUSH_CURRENT(ctx, 0);
          COPY_4V(params, ctx->Current.Attrib[index]);
          break;
       default:
index 68830c30e40d8bb89f0b6ca2263b06a948e45a62..67f416dbc2267ecf9d705f32436e61e48852f0b8 100644 (file)
@@ -697,6 +697,7 @@ _mesa_GetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble *params)
          params[0] = ctx->Array.VertexAttrib[index].Type;
          break;
       case GL_CURRENT_ATTRIB_NV:
+        FLUSH_CURRENT(ctx, 0);
          COPY_4V(params, ctx->Current.Attrib[index]);
          break;
       default:
@@ -732,6 +733,7 @@ _mesa_GetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat *params)
          params[0] = (GLfloat) ctx->Array.VertexAttrib[index].Type;
          break;
       case GL_CURRENT_ATTRIB_NV:
+        FLUSH_CURRENT(ctx, 0);
          COPY_4V(params, ctx->Current.Attrib[index]);
          break;
       default:
@@ -767,6 +769,7 @@ _mesa_GetVertexAttribivNV(GLuint index, GLenum pname, GLint *params)
          params[0] = ctx->Array.VertexAttrib[index].Type;
          break;
       case GL_CURRENT_ATTRIB_NV:
+        FLUSH_CURRENT(ctx, 0);
          COPY_4V_CAST(params, ctx->Current.Attrib[index], GLint);
          break;
       case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB: