diff options
author | Ian Romanick <[email protected]> | 2008-09-29 12:30:05 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2008-09-29 12:30:05 -0700 |
commit | 3ab4b2066fd0b1493af38510e26e5a6ba83b5cf4 (patch) | |
tree | e7b90482b8e890cce23d86f0b02f4f02707ed10d /src/mesa/main | |
parent | 905d8e0742d200558677dac01a838e95877f7b5e (diff) |
GLSL: Implement GL_OBJECT_TYPE_ARB query
The GL_OBJECT_TYPE_ARB query is handled directly in
_mesa_GetObjectParamterivARB because it is only supported in the
extension version of the shanding language API. glGetProgramiv and
glGetShaderiv should not accept this enum.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/shaders.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index f0db0d2a818..aeb5d4ca2ab 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -233,10 +233,18 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params) GET_CURRENT_CONTEXT(ctx); /* Implement in terms of GetProgramiv, GetShaderiv */ if (ctx->Driver.IsProgram(ctx, object)) { - ctx->Driver.GetProgramiv(ctx, object, pname, params); + if (pname == GL_OBJECT_TYPE_ARB) { + *params = GL_PROGRAM_OBJECT_ARB; + } else { + ctx->Driver.GetProgramiv(ctx, object, pname, params); + } } else if (ctx->Driver.IsShader(ctx, object)) { - ctx->Driver.GetShaderiv(ctx, object, pname, params); + if (pname == GL_OBJECT_TYPE_ARB) { + *params = GL_SHADER_OBJECT_ARB; + } else { + ctx->Driver.GetShaderiv(ctx, object, pname, params); + } } else { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB"); |