Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glgetprogramresourcelocationindex(3g) [centos man page]

GLGETPROGRAMRESOURCE(3G)					   OpenGL Manual					  GLGETPROGRAMRESOURCE(3G)

NAME
glGetProgramResourceLocationIndex - query the fragment color index of a named variable within a program C SPECIFICATION
GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const char * name); PARAMETERS
program The name of a program object whose resources to query. programInterface A token identifying the interface within program containing the resource named name. name The name of the resource to query the location of. DESCRIPTION
glGetProgramResourceLocation 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 one of 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: o the string exactly matches the name of the active variable o if the string identifies the base name of an active array, where the string would exactly match the name of the variable if the suffix "[0]" were appended to the string o if the string identifies an active element of the array, where the string ends with the concatenation of the "[" character, an integer with no "+" sign, extra leading zeroes, or whitespace identifying an array element, and the "]" character, the integer is less than the number of active elements of the array variable, and where the string would exactly match the enumerated name of the array if the decimal integer were replaced with zero. 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. ERRORS
GL_INVALID_VALUE is generated if program is not the name of an existing program object. GL_INVALID_ENUM is generated if programInterface is not one of the accepted interface types. GL_INVALID_OPERATION is generated if program has not been linked successfully. SEE ALSO
glGetProgramResourceName(), glGetProgramResourceIndex(), glGetGetProgramResource(), glGetProgramResourceLocationIndex(). COPYRIGHT
Copyright (C) 2012 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/. AUTHORS
opengl.org opengl.org 06/10/2014 GLGETPROGRAMRESOURCE(3G)

Check Out this Related Man Page

GLGETPROGRAMRESOURCE(3G)					   OpenGL Manual					  GLGETPROGRAMRESOURCE(3G)

NAME
glGetProgramResourceName - query the name of an indexed resource within a program C SPECIFICATION
void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, char * name); PARAMETERS
program The name of a program object whose resources to query. programInterface A token identifying the interface within program containing the indexed resource. index The index of the resource within programInterface of program. bufSize The size of the character array whose address is given by name. length The address of a variable which will receive the length of the resource name. name The address of a character array into which will be written the name of the resource. DESCRIPTION
glGetProgramResourceName retrieves the name string assigned to the single active resource with an index of index in the interface programInterface of program object program. index must be less than the number of entries in the active resource list for programInterface. program must be the name of an existing program object. programInterface is the name of the interface within program which contains the resource and must be one of the following values: GL_UNIFORM The query is targeted at the set of active uniforms within program. GL_UNIFORM_BLOCK The query is targeted at the set of active uniform blocks within program. GL_PROGRAM_INPUT The query is targeted at the set of active input variables used by the first shader stage of program. If program contains multiple shader stages then input variables from any stage other than the first will not be enumerated. GL_PROGRAM_OUTPUT The query is targeted at the set of active output variables produced by the last shader stage of program. If program contains multiple shader stages then output variables from any stage other than the last will not be enumerated. GL_VERTEX_SUBROUTINE, GL_TESS_CONTROL_SUBROUTINE, GL_TESS_EVALUATION_SUBROUTINE, GL_GEOMETRY_SUBROUTINE, GL_FRAGMENT_SUBROUTINE, GL_COMPUTE_SUBROUTINE , , , , , The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages of program, respectively. GL_VERTEX_SUBROUTINE_UNIFORM, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, GL_GEOMETRY_SUBROUTINE_UNIFORM, GL_FRAGMENT_SUBROUTINE_UNIFORM, GL_COMPUTE_SUBROUTINE_UNIFORM , , , , , The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages of program, respectively. GL_TRANSFORM_FEEDBACK_VARYING The query is targeted at the set of output variables from the last non-fragment stage of program that would be captured if transform feedback were active. GL_BUFFER_VARIABLE The query is targeted at the set of active buffer variables used by program. GL_SHADER_STORAGE_BLOCK The query is targeted at the set of active shader storage blocks used by program. The name string assigned to the active resource identified by index is returned as a null-terminated string in the character array whose address is given in name. The actual number of characters written into name, excluding the null terminator, is returned in length. If length is NULL, no length is returned. The maximum number of characters that may be written into name, including the null terminator, is specified by bufSize. If the length of the name string including the null terminator is greater than bufSize, the first bufSize-1 characters of the name string will be written to name, followed by a null terminator. If bufSize is zero, no error will be generated but no characters will be written to name. The length of the longest name string for programInterface>, including a null terminator, can be queried by calling glGetProgramInterface() with a pname of GL_MAX_NAME_LENGTH. ERRORS
GL_INVALID_ENUM is generated if programInterface is not one of the accepted interface types. GL_INVALID_VALUE is generated if progam is not the name of an existing program. GL_INVALID_VALUE is generated if index is greater than or equal to the number of entries in the active resource list for programInterface. SEE ALSO
glGetProgramResourceIndex(), glGetGetProgramResource(), glGetProgramResourceLocation(), glGetProgramResourceLocationIndex(). COPYRIGHT
Copyright (C) 2012 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/. AUTHORS
opengl.org opengl.org 06/10/2014 GLGETPROGRAMRESOURCE(3G)
Man Page