diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-08-01 00:18:48 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-08-01 00:18:48 +0100 |
commit | f2c9f6d412ff55dce49152b9d577e4e17954646d (patch) | |
tree | f4836bad6a590e0838349fa61c4d089bb4d85439 /glstate.cpp | |
parent | 26b3417ecac43b5d0d6c2a8cc22de5c128b64f16 (diff) |
Fix shader type from ARB_shader_objects.
Diffstat (limited to 'glstate.cpp')
-rw-r--r-- | glstate.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/glstate.cpp b/glstate.cpp index b075509..29ec26d 100644 --- a/glstate.cpp +++ b/glstate.cpp @@ -121,8 +121,14 @@ getShaderObjSource(ShaderMap &shaderMap, GLhandleARB shaderObj) return; } + GLint object_type = 0; + glGetObjectParameterivARB(shaderObj, GL_OBJECT_TYPE_ARB, &object_type); + if (object_type != GL_SHADER_OBJECT_ARB) { + return; + } + GLint shader_type = 0; - glGetObjectParameterivARB(shaderObj, GL_OBJECT_TYPE_ARB, &shader_type); + glGetObjectParameterivARB(shaderObj, GL_OBJECT_SUBTYPE_ARB, &shader_type); if (!shader_type) { return; } |