Provided by: opengl-4-man-doc_1.0~svn33624-1_all bug

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

       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:

       •   the string exactly matches the name of the active variable

       •   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

       •   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.

VERSION SUPPORT

       ┌──────────────────────────────────┬───────────────────────────────────────────────────────────────────────┐
       │                                  │                OpenGL Version                                         │
       ├──────────────────────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
       │Function2.02.13.03.13.23.34.04.14.24.34.44.5 │
       │/                                 │     │     │     │     │     │     │     │     │     │     │     │     │
       │Feature                           │     │     │     │     │     │     │     │     │     │     │     │     │
       │Name                              │     │     │     │     │     │     │     │     │     │     │     │     │
       ├──────────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
       │glGetProgramResourceLocationIndex │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  -  │  ✔  │  ✔  │  ✔  │
       └──────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘

SEE ALSO

       glGetProgramResourceName(), glGetProgramResourceIndex(), glGetProgramResource(),
       glGetProgramResourceLocationIndex().

COPYRIGHT

       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/.

COPYRIGHT

       Copyright © 2013-2014 Khronos Group

[FIXME: source]                             01/03/2018                   GLGETPROGRAMRESOURCE(3G)