Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glgetprogramresourcelocation(3g) [centos man page]

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

NAME
glGetProgramResourceLocation - query the location of a named resource within a program C SPECIFICATION
GLint glGetProgramResourceLocation(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 location 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 GL_UNIFORM, GL_PROGRAM_INPUT, GL_PROGRAM_OUTPUT, GL_VERTEX_SUBROUTINE_UNIFORM, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, GL_GEOMETRY_SUBROUTINE_UNIFORM, GL_FRAGMENT_SUBROUTINE_UNIFORM, or GL_COMPUTE_SUBROUTINE_UNIFORM. 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 glGetProgramResourceLocation 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

GLGETPROGRAMINTERFAC(3G)					   OpenGL Manual					  GLGETPROGRAMINTERFAC(3G)

NAME
glGetProgramInterface - query a property of an interface in a program C SPECIFICATION
void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params); PARAMETERS
program The name of a program object whose interface to query. programInterface A token identifying the interface within program to query. pname The name of the parameter within programInterface to query. params The address of a variable to retrieve the value of pname for the program interface. DESCRIPTION
glGetProgramInterfaceiv queries the property of the interface identifed by programInterface in program, the property name of which is given by pname. program must be the name of an existing program object. programInterface is the name of the interface within program to query 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_ATOMIC_COUNTER_BUFFER The query is targeted at the set of active atomic counter buffer binding points 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. pname identifies the property of programInterface to return in params. If pname is GL_ACTIVE_RESOURCES, the value returned is the number of resources in the active resource list for programInterface. If the list of active resources for programInterface is empty, zero is returned. If pname is GL_MAX_NAME_LENGTH, the value returned is the length of the longest active name string for an active resource in programInterface. This length includes an extra character for the null terminator. If the list of active resources for programInterface is empty, zero is returned. It is an error to specify GL_MAX_NAME_LENGTH when programInterface is GL_ATOMIC_COUNTER_BUFFER, as active atomic counter buffer resources are not assigned name strings. If pname is GL_MAX_NUM_ACTIVE_VARIABLES, the value returned is the number of active variables belonging to the interface block or atomic counter buffer resource in programInterface with the most active variables. If the list of active resources for programInterface is empty, zero is returned. When pname is GL_MAX_NUM_ACTIVE_VARIABLES, programInterface must be GL_UNIFORM_BLOCK, GL_ATOMIC_COUNTER_BUFFER, or GL_SHADER_STORAGE_BLOCK. If pname is GL_MAX_NUM_COMPATIBLE_SUBROUTINES, the value returned is the number of compatible subroutines belonging to the active subroutine uniform in programInterface with the most compatible subroutines. If the list of active resources for programInterface is empty, zero is returned. When pname is GL_MAX_NUM_COMPATIBLE_SUBROUTINES, programInterface must be one of GL_VERTEX_SUBROUTINE_UNIFORM, GL_TESS_CONTROL_SUBROUTINE_UNIFORM, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM, GL_GEOMETRY_SUBROUTINE_UNIFORM, GL_FRAGMENT_SUBROUTINE_UNIFORM, or GL_COMPUTE_SUBROUTINE_UNIFORM. ERRORS
GL_INVALID_ENUM is generated if identifier is not one of the accepted object types. GL_INVALID_VALUE is generated if program is not the name of an existing sync object. GL_INVALID_VALUE is generated if bufSize is zero. If not NULL, length and label should be addresses to which the client has write access, otherwise undefined behavior, including process termination may occur. ASSOCIATED GETS
glGet() with argument GL_MAX_LABEL_LENGTH. SEE ALSO
glPushDebugGroup(), glPopDebugGroup(), glObjectLabel(), glGetObjectLabel(). 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 GLGETPROGRAMINTERFAC(3G)
Man Page