mesa: Support GL_VERTEX_ATTRIB_ARRAY_INTEGER in GL 3.0 contexts.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 16 Jan 2012 18:34:56 +0000 (10:34 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Jan 2012 08:45:00 +0000 (00:45 -0800)
According to Table 6.8 (Page 348) in the OpenGL 3.0 specification,
glGetVertexAttribiv supports GL_VERTEX_ATTRIB_ARRAY_INTEGER.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/varray.c

index 540e8963c814129fbfb8876c132b30c832d0dc37..9078d116126f62544a501f8c94ffddfcc134d3ae 100644 (file)
@@ -555,7 +555,7 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
    case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
       return array->BufferObj->Name;
    case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
-      if (ctx->Extensions.EXT_gpu_shader4) {
+      if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4) {
          return array->Integer;
       }
       goto error;