glGetProgramResourceName, glGetProgramResourceIndex, glGetProgramResource, glGetProgramResourceLocationIndex.
Copyright© 2013-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
Page generated by adrdox
glGetProgramResourceLocationIndex: man4/glGetProgramResourceLocationIndex.xml
glGetProgramResourceLocationIndex returns the fragment color index assigned to the variable named name in interface programInterface of program object program. program must be the name of a program that has been linked successfully. programInterface must be GL_PROGRAM_OUTPUT. The value -1 will be returned if an error occurs, if name does not identify an active variable on programInterface, or if name identifies an active variable that does not have a valid location assigned, as described above. The locations returned by these commands are the same locations returned when querying the GL_LOCATION and GL_LOCATION_INDEX resource properties. A string provided to glGetProgramResourceLocationIndex is considered to match an active variable if:
Any other string is considered not to identify an active variable. If the string specifies an element of an array variable, glGetProgramResourceLocation returns the location assigned to that element. If it specifies the base name of an array, it identifies the resources associated with the first element of the array.