case GL_NUM_EXTENSIONS:
params[0] = INT_TO_BOOLEAN(_mesa_get_extension_count(ctx));
break;
+ case GL_MAJOR_VERSION:
+ params[0] = INT_TO_BOOLEAN(ctx->VersionMajor);
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = INT_TO_BOOLEAN(ctx->VersionMinor);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
}
case GL_NUM_EXTENSIONS:
params[0] = (GLfloat)(_mesa_get_extension_count(ctx));
break;
+ case GL_MAJOR_VERSION:
+ params[0] = (GLfloat)(ctx->VersionMajor);
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = (GLfloat)(ctx->VersionMinor);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
}
case GL_NUM_EXTENSIONS:
params[0] = _mesa_get_extension_count(ctx);
break;
+ case GL_MAJOR_VERSION:
+ params[0] = ctx->VersionMajor;
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = ctx->VersionMinor;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
}
case GL_NUM_EXTENSIONS:
params[0] = (GLint64)(_mesa_get_extension_count(ctx));
break;
+ case GL_MAJOR_VERSION:
+ params[0] = (GLint64)(ctx->VersionMajor);
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = (GLint64)(ctx->VersionMinor);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64v(pname=0x%x)", pname);
}
# GL3
( "GL_NUM_EXTENSIONS", GLint, ["_mesa_get_extension_count(ctx)"], "", None ),
+ ( "GL_MAJOR_VERSION", GLint, ["ctx->VersionMajor"], "", None ),
+ ( "GL_MINOR_VERSION", GLint, ["ctx->VersionMinor"], "", None )
]