summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-07-26 14:43:56 -0700
committerEric Anholt <[email protected]>2012-08-07 11:47:19 -0700
commit9c1b41879aab2ff7386c547a2ccce7686c018cf5 (patch)
tree934b03d503f257d3979d6ebe9ad36cee2953bb25 /src/mesa/main/varray.c
parent3aaeb3e5e76b7b468e2eb2a26f30d68d19d3c854 (diff)
mesa: Replace VersionMajor/VersionMinor with a Version field.
As we get into supporting GL 3.x core, we come across more and more features of the API that depend on the version number as opposed to just the extension list. This will let us more sanely do version checks than "(VersionMajor == 3 && VersionMinor >= 2) || VersionMajor >= 4". v2: Fix a bad <= 30 check. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 7ec7cfee6f4..327fabbc1e3 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -568,7 +568,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->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4) {
+ if (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4) {
return array->Integer;
}
goto error;
@@ -1092,8 +1092,7 @@ _mesa_PrimitiveRestartIndex(GLuint index)
{
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->Extensions.NV_primitive_restart &&
- ctx->VersionMajor * 10 + ctx->VersionMinor < 31) {
+ if (!ctx->Extensions.NV_primitive_restart && ctx->Version < 31) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndexNV()");
return;
}