GLGETPROGRAMINTERFAC(3G)

    .SH "NAME" glGetProgramInterface - query a property of an interface in a program
    .SH "C SPECIFICATION"

            .HP u void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params);

    .SH "PARAMETERS"

        .PP program

                    The name of a program object whose interface to query.

            .RE
            .PP programInterface

                        A token identifying the interface within program to query.

                .RE
                .PP pname

                            The name of the parameter within programInterface to query.

                    .RE
                    .PP params

                                The address of a variable to retrieve the value of pname for the program interface.

                        .RE

                    .SH "DESCRIPTION"
                        .PP glGetProgramInterfaceiv queries the property of the interface identifed by programInterface in program, the property name of which is given by pname.
                        .PP 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:

                            .PP GL_UNIFORM

                                        The query is targeted at the set of active uniforms within program.

                                .RE
                                .PP GL_UNIFORM_BLOCK

                                            The query is targeted at the set of active uniform blocks within program.

                                    .RE
                                    .PP GL_ATOMIC_COUNTER_BUFFER

                                                The query is targeted at the set of active atomic counter buffer binding points within program.

                                        .RE
                                        .PP 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.

                                            .RE
                                            .PP 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.

                                                .RE
                                                .PP 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.

                                                    .RE
                                                    .PP GL_BUFFER_VARIABLE

                                                                The query is targeted at the set of active buffer variables used by program.

                                                        .RE
                                                        .PP GL_SHADER_STORAGE_BLOCK

                                                                    The query is targeted at the set of active shader storage blocks used by program.

                                                            .RE
                                                            .PP GL_TRANSFORM_FEEDBACK_BUFFER

                                                                        The query is targeted at the set of active buffer binding points to which output variables in the GL_TRANSFORM_FEEDBACK_VARYING interface are written.

                                                                .RE

                                                            .PP pname identifies the property of programInterface to return in params.
                                                            .PP 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.
                                                            .PP 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.
                                                            .PP 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.

                                                        .SH "ERRORS"
                                                            .PP GL_INVALID_ENUM is generated if identifier is not one of the accepted object types.
                                                            .PP GL_INVALID_VALUE is generated if program is not the name of an existing program object.
                                                            .PP GL_INVALID_OPERATION is generated if pname is GL_MAX_NAME_LENGTH and programInterface is GL_ATOMIC_COUNTER_BUFFER or GL_TRANSFORM_FEEDBACK_BUFFER, since active atomic counter and transform feedback buffer resources are not assigned name strings.
                                                            .PP GL_INVALID_OPERATION error is generated if pname is GL_MAX_NUM_ACTIVE_VARIABLES and programInterface is not GL_UNIFORM_BLOCK, GL_SHADER_STORAGE_BLOCK, GL_ATOMIC_COUNTER_BUFFER, or GL_TRANSFORM_FEEDBACK_BUFFER.

                                                        .SH "ASSOCIATED GETS"
                                                            .PP glGet() with argument GL_MAX_LABEL_LENGTH.

                                                        .SH "API VERSION SUPPORT"

                                                            .TS allbox tab(:); l l l l l. T{ glGetProgramInterfaceiv T}:T{ T}:T{ T}:T{ T}:T{ T}

                                                        .SH "SEE ALSO"
                                                            .PP glGetProgramResourceName(), glGetProgramResourceIndex(), glGetProgramResourceLocation(), glGetProgramResourceiv().

                                                        .SH "COPYRIGHT"
                                                            .PP Copyright © 2012-2015 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 © 2012-2015 Khronos Group