mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-14 05:50:51 +00:00
Check for version > 4.4 or GL_ARB_enhanced_layouts
This commit is contained in:
@@ -874,7 +874,13 @@ void MakeShaderReflection(const GLHookSet &gl, GLenum shadType, GLuint sepProg,
|
||||
{
|
||||
GLenum props[] = { eGL_NAME_LENGTH, eGL_TYPE, eGL_LOCATION, eGL_LOCATION_COMPONENT };
|
||||
GLint values[] = { 0 , 0 , 0 , 0 };
|
||||
gl.glGetProgramResourceiv(sepProg, sigEnum, i, ARRAY_COUNT(props), props, ARRAY_COUNT(props), NULL, values);
|
||||
|
||||
GLsizei numProps = (GLsizei)ARRAY_COUNT(props);
|
||||
|
||||
// GL_LOCATION_COMPONENT not supported on core <4.4 (or without GL_ARB_enhanced_layouts)
|
||||
if(!ExtensionSupported("GL_ARB_enhanced_layouts") && GLCoreVersion < 44)
|
||||
numProps--;
|
||||
gl.glGetProgramResourceiv(sepProg, sigEnum, i, numProps, props, numProps, NULL, values);
|
||||
|
||||
char *nm = new char[values[0]+1];
|
||||
gl.glGetProgramResourceName(sepProg, sigEnum, i, values[0]+1, NULL, nm);
|
||||
|
||||
Reference in New Issue
Block a user