Class ARBShaderObjects



  • public class ARBShaderObjects
    extends java.lang.Object
    Native bindings to the ARB_shader_objects extension.

    This extension adds API calls that are necessary to manage shader objects and program objects as defined in the OpenGL 2.0 white papers by 3Dlabs.

    The generation of an executable that runs on one of OpenGL's programmable units is modeled to that of developing a typical C/C++ application. There are one or more source files, each of which are stored by OpenGL in a shader object. Each shader object (source file) needs to be compiled and attached to a program object. Once all shader objects are compiled successfully, the program object needs to be linked to produce an executable. This executable is part of the program object, and can now be loaded onto the programmable units to make it part of the current OpenGL state. Both the compile and link stages generate a text string that can be queried to get more information. This information could be, but is not limited to, compile errors, link errors, optimization hints, etc. Values for uniform variables, declared in a shader, can be set by the application and used to control a shader's behavior.

    This extension defines functions for creating shader objects and program objects, for compiling shader objects, for linking program objects, for attaching shader objects to program objects, and for using a program object as part of current state. Functions to load uniform values are also defined. Some house keeping functions, like deleting an object and querying object state, are also provided.

    Although this extension defines the API for creating shader objects, it does not define any specific types of shader objects. It is assumed that this extension will be implemented along with at least one such additional extension for creating a specific type of OpenGL 2.0 shader (e.g., the ARB_fragment_shader extension or the ARB_vertex_shader extension).

    Promoted to core in OpenGL 2.0.

    • Method Detail

      • glDeleteObjectARB

        public static void glDeleteObjectARB(int obj)
        Either deletes the object, or flags it for deletion. An object that is attached to a container object is not deleted until it is no longer attached to any container object, for any context. If it is still attached to at least one container object, the object is flagged for deletion. If the object is part of the current rendering state, it is not deleted until it is no longer part of the current rendering state for any context. If the object is still part of the rendering state of at least one context, it is flagged for deletion.

        If an object is flagged for deletion, its Boolean status bit OBJECT_DELETE_STATUS_ARB is set to true.

        DeleteObjectARB will silently ignore the value zero.

        When a container object is deleted, it will detach each attached object as part of the deletion process. When an object is deleted, all information for the object referenced is lost. The data for the object is also deleted.

        Parameters:
        obj - the shader object to delete
      • glGetHandleARB

        public static int glGetHandleARB(int pname)
        Returns the handle to an object that is in use as part of current state.
        Parameters:
        pname - the state item for which the current object is to be returned. Must be:
        PROGRAM_OBJECT_ARB
      • glDetachObjectARB

        public static void glDetachObjectARB(int containerObj,
                                             int attachedObj)
        Detaches an object from the container object it is attached to.
        Parameters:
        containerObj - the container object
        attachedObj - the object to detach
      • glCreateShaderObjectARB

        public static int glCreateShaderObjectARB(int shaderType)
        Creates a shader object.
        Parameters:
        shaderType - the type of the shader object to be created. One of:
        VERTEX_SHADER_ARBFRAGMENT_SHADER_ARB
      • glShaderSourceARB

        public static void glShaderSourceARB(int shaderObj,
                                             org.lwjgl.PointerBuffer string,
                                             java.nio.IntBuffer length)
        Sets the source code for the specified shader object shaderObj to the text strings in the string array. If the object previously had source code loaded into it, it is completely replaced.

        The strings that are loaded into a shader object are expected to form the source code for a valid shader as defined in the OpenGL Shading Language Specification.

        Parameters:
        shaderObj - the shader object
        string - an array of pointers to one or more, optionally null terminated, character strings that make up the source code
        length - an array with the number of charARBs in each string (the string length). Each element in this array can be set to negative one (or smaller), indicating that its accompanying string is null terminated. If length is set to NULL, all strings in the string argument are considered null terminated.
      • glShaderSourceARB

        public static void glShaderSourceARB(int shaderObj,
                                             java.lang.CharSequence... string)
        
        public static void glShaderSourceARB(int shaderObj,
                                             java.lang.CharSequence string)
        
        Sets the source code for the specified shader object shaderObj to the text strings in the string array. If the object previously had source code loaded into it, it is completely replaced.

        The strings that are loaded into a shader object are expected to form the source code for a valid shader as defined in the OpenGL Shading Language Specification.

        Parameters:
        shaderObj - the shader object
        string - an array of pointers to one or more, optionally null terminated, character strings that make up the source code
      • glCompileShaderARB

        public static void glCompileShaderARB(int shaderObj)
        Compiles a shader object. Each shader object has a Boolean status, OBJECT_COMPILE_STATUS_ARB, that is modified as a result of compilation. This status can be queried with GetObjectParameterivARB. This status will be set to TRUE if the shader shaderObj was compiled without errors and is ready for use, and FALSE otherwise. Compilation can fail for a variety of reasons as listed in the OpenGL Shading Language Specification. If CompileShaderARB failed, any information about a previous compile is lost and is not restored. Thus a failed compile does not restore the old state of shaderObj. If shaderObj does not reference a shader object, the error INVALID_OPERATION is generated.

        Note that changing the source code of a shader object, through ShaderSourceARB, does not change its compile status OBJECT_COMPILE_STATUS_ARB.

        Each shader object has an information log that is modified as a result of compilation. This information log can be queried with GetInfoLogARB to obtain more information about the compilation attempt.

        Parameters:
        shaderObj - the shader object to compile
      • glCreateProgramObjectARB

        public static int glCreateProgramObjectARB()
        Creates a program object.

        A program object is a container object. Shader objects are attached to a program object with the command AttachObjectARB. It is permissible to attach shader objects to program objects before source code has been loaded into the shader object, or before the shader object has been compiled. It is permissible to attach multiple shader objects of the same type to a single program object, and it is permissible to attach a shader object to more than one program object.

      • glAttachObjectARB

        public static void glAttachObjectARB(int containerObj,
                                             int obj)
        Attaches an object to a container object.
        Parameters:
        containerObj - the container object
        obj - the object to attach
      • glLinkProgramARB

        public static void glLinkProgramARB(int programObj)
        Links a program object.

        Each program object has a Boolean status, OBJECT_LINK_STATUS_ARB, that is modified as a result of linking. This status can be queried with GetObjectParameterivARB. This status will be set to TRUE if a valid executable is created, and FALSE otherwise. Linking can fail for a variety of reasons as specified in the OpenGL Shading Language Specification. Linking will also fail if one or more of the shader objects, attached to programObj, are not compiled successfully, or if more active uniform or active sampler variables are used in programObj than allowed. If LinkProgramARB failed, any information about a previous link is lost and is not restored. Thus a failed link does not restore the old state of programObj. If programObj is not of type PROGRAM_OBJECT_ARB, the error INVALID_OPERATION is generated.

        Each program object has an information log that is modified as a result of a link operation. This information log can be queried with GetInfoLogARB to obtain more information about the link operation.

        Parameters:
        programObj - the program object to link
      • glUseProgramObjectARB

        public static void glUseProgramObjectARB(int programObj)
        Installs the executable code as part of current rendering state if the program object programObj contains valid executable code, i.e. has been linked successfully. If UseProgramObjectARB is called with the handle set to 0, it is as if the GL had no programmable stages and the fixed functionality paths will be used instead. If programObj cannot be made part of the current rendering state, an INVALID_OPERATION error will be generated and the current rendering state left unmodified. This error will be set, for example, if programObj has not been linked successfully. If programObj is not of type PROGRAM_OBJECT_ARB, the error INVALID_OPERATION is generated.

        While a program object is in use, applications are free to modify attached shader objects, compile attached shader objects, attach additional shader objects, and detach shader objects. This does not affect the link status OBJECT_LINK_STATUS_ARB of the program object. This does not affect the executable code that is part of the current state either. That executable code is only affected when the program object has been re-linked successfully. After such a successful re-link, the LinkProgramARB command will install the generated executable code as part of the current rendering state if the specified program object was already in use as a result of a previous call to UseProgramObjectARB. If this re-link failed, then the executable code part of the current state does not change.

        Parameters:
        programObj - the program object to use
      • glValidateProgramARB

        public static void glValidateProgramARB(int programObj)
        Validates the program object programObj against the GL state at that moment. Each program object has a Boolean status, OBJECT_VALIDATE_STATUS_ARB, that is modified as a result of validation. This status can be queried with GetObjectParameterivARB. If validation succeeded this status will be set to TRUE, otherwise it will be set to FALSE. If validation succeeded the program object is guaranteed to execute, given the current GL state. If validation failed, the program object is guaranteed to not execute, given the current GL state. If programObj is not of type PROGRAM_OBJECT_ARB, the error INVALID_OPERATION is generated.

        ValidateProgramARB will validate at least as much as is done when a rendering command is issued, and it could validate more. For example, it could give a hint on how to optimize some piece of shader code.

        ValidateProgramARB will store its information in the info log. This information will either be an empty string or it will contain validation information.

        ValidateProgramARB is typically only useful during application development. An application should not expect different OpenGL implementations to produce identical information.

        Parameters:
        programObj - the program object to validate
      • glUniform1fARB

        public static void glUniform1fARB(int location,
                                          float v0)
        float version of Uniform4fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
      • glUniform2fARB

        public static void glUniform2fARB(int location,
                                          float v0,
                                          float v1)
        vec2 version of Uniform4fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
        v1 - the uniform y value
      • glUniform3fARB

        public static void glUniform3fARB(int location,
                                          float v0,
                                          float v1,
                                          float v2)
        vec3 version of Uniform4fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
        v1 - the uniform y value
        v2 - the uniform z value
      • glUniform4fARB

        public static void glUniform4fARB(int location,
                                          float v0,
                                          float v1,
                                          float v2,
                                          float v3)
        Loads a vec4 value into a uniform variable of the program object that is currently in use.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
        v1 - the uniform y value
        v2 - the uniform z value
        v3 - the uniform w value
      • glUniform1iARB

        public static void glUniform1iARB(int location,
                                          int v0)
        int version of Uniform1fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
      • glUniform2iARB

        public static void glUniform2iARB(int location,
                                          int v0,
                                          int v1)
        ivec2 version of Uniform2fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
        v1 - the uniform y value
      • glUniform3iARB

        public static void glUniform3iARB(int location,
                                          int v0,
                                          int v1,
                                          int v2)
        ivec3 version of Uniform3fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
        v1 - the uniform y value
        v2 - the uniform z value
      • glUniform4iARB

        public static void glUniform4iARB(int location,
                                          int v0,
                                          int v1,
                                          int v2,
                                          int v3)
        ivec4 version of Uniform4fARB.
        Parameters:
        location - the uniform variable location
        v0 - the uniform x value
        v1 - the uniform y value
        v2 - the uniform z value
        v3 - the uniform w value
      • glUniform1fvARB

        public static void glUniform1fvARB(int location,
                                           java.nio.FloatBuffer value)
        Loads floating-point values count times into a uniform location defined as an array of float values.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform2fvARB

        public static void glUniform2fvARB(int location,
                                           java.nio.FloatBuffer value)
        Loads floating-point values count times into a uniform location defined as an array of vec2 vectors.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform3fvARB

        public static void glUniform3fvARB(int location,
                                           java.nio.FloatBuffer value)
        Loads floating-point values count times into a uniform location defined as an array of vec3 vectors.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform4fvARB

        public static void glUniform4fvARB(int location,
                                           java.nio.FloatBuffer value)
        Loads floating-point values count times into a uniform location defined as an array of vec4 vectors.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform1ivARB

        public static void glUniform1ivARB(int location,
                                           java.nio.IntBuffer value)
        Loads integer values count times into a uniform location defined as an array of integer values.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform2ivARB

        public static void glUniform2ivARB(int location,
                                           java.nio.IntBuffer value)
        Loads integer values count times into a uniform location defined as an array of ivec2 vectors.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform3ivARB

        public static void glUniform3ivARB(int location,
                                           java.nio.IntBuffer value)
        Loads integer values count times into a uniform location defined as an array of ivec3 vectors.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniform4ivARB

        public static void glUniform4ivARB(int location,
                                           java.nio.IntBuffer value)
        Loads integer values count times into a uniform location defined as an array of ivec4 vectors.
        Parameters:
        location - the uniform variable location
        value - the values to load
      • glUniformMatrix2fvARB

        public static void glUniformMatrix2fvARB(int location,
                                                 boolean transpose,
                                                 java.nio.FloatBuffer value)
        Loads a 2x2 matrix of floating-point values count times into a uniform location defined as a matrix or an array of matrices.
        Parameters:
        location - the uniform variable location
        transpose - if FALSE, the matrix is specified in column major order, otherwise in row major order
        value - the matrix values to load
      • glUniformMatrix3fvARB

        public static void glUniformMatrix3fvARB(int location,
                                                 boolean transpose,
                                                 java.nio.FloatBuffer value)
        Loads a 3x3 matrix of floating-point values count times into a uniform location defined as a matrix or an array of matrices.
        Parameters:
        location - the uniform variable location
        transpose - if FALSE, the matrix is specified in column major order, otherwise in row major order
        value - the matrix values to load
      • glUniformMatrix4fvARB

        public static void glUniformMatrix4fvARB(int location,
                                                 boolean transpose,
                                                 java.nio.FloatBuffer value)
        Loads a 4x4 matrix of floating-point values count times into a uniform location defined as a matrix or an array of matrices.
        Parameters:
        location - the uniform variable location
        transpose - if FALSE, the matrix is specified in column major order, otherwise in row major order
        value - the matrix values to load
      • glGetObjectParameterfvARB

        public static void glGetObjectParameterfvARB(int obj,
                                                     int pname,
                                                     java.nio.FloatBuffer params)
        Returns object specific parameter values.
        Parameters:
        obj - the object to query
        pname - the parameter to query
        params - a buffer in which to return the parameter value
      • glGetInfoLogARB

        public static void glGetInfoLogARB(int obj,
                                           java.nio.IntBuffer length,
                                           java.nio.ByteBuffer infoLog)
        A string that contains information about the last link or validation attempt and last compilation attempt are kept per program or shader object. This string is called the info log and can be obtained with this command.

        This string will be null terminated. The number of characters in the info log is given by OBJECT_INFO_LOG_LENGTH_ARB, which can be queried with GetObjectParameterivARB. If obj is a shader object, the returned info log will either be an empty string or it will contain information about the last compilation attempt for that object. If obj is a program object, the returned info log will either be an empty string or it will contain information about the last link attempt or last validation attempt for that object. If obj is not of type PROGRAM_OBJECT_ARB or SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters length and infoLog will be unmodified.

        The info log is typically only useful during application development and an application should not expect different OpenGL implementations to produce identical info logs.

        Parameters:
        obj - the shader object to query
        length - the actual number of characters written by the GL into infoLog is returned in length, excluding the null termination. If length is NULL then the GL ignores this parameter.
        infoLog - a buffer in which to return the info log
      • glGetInfoLogARB

        public static java.lang.String glGetInfoLogARB(int obj,
                                                       int maxLength)
        A string that contains information about the last link or validation attempt and last compilation attempt are kept per program or shader object. This string is called the info log and can be obtained with this command.

        This string will be null terminated. The number of characters in the info log is given by OBJECT_INFO_LOG_LENGTH_ARB, which can be queried with GetObjectParameterivARB. If obj is a shader object, the returned info log will either be an empty string or it will contain information about the last compilation attempt for that object. If obj is a program object, the returned info log will either be an empty string or it will contain information about the last link attempt or last validation attempt for that object. If obj is not of type PROGRAM_OBJECT_ARB or SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters length and infoLog will be unmodified.

        The info log is typically only useful during application development and an application should not expect different OpenGL implementations to produce identical info logs.

        Parameters:
        obj - the shader object to query
        maxLength - the maximum number of characters the GL is allowed to write into infoLog
      • glGetInfoLogARB

        public static java.lang.String glGetInfoLogARB(int obj)
        A string that contains information about the last link or validation attempt and last compilation attempt are kept per program or shader object. This string is called the info log and can be obtained with this command.

        This string will be null terminated. The number of characters in the info log is given by OBJECT_INFO_LOG_LENGTH_ARB, which can be queried with GetObjectParameterivARB. If obj is a shader object, the returned info log will either be an empty string or it will contain information about the last compilation attempt for that object. If obj is a program object, the returned info log will either be an empty string or it will contain information about the last link attempt or last validation attempt for that object. If obj is not of type PROGRAM_OBJECT_ARB or SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters length and infoLog will be unmodified.

        The info log is typically only useful during application development and an application should not expect different OpenGL implementations to produce identical info logs.

        Parameters:
        obj - the shader object to query
      • glGetAttachedObjectsARB

        public static void glGetAttachedObjectsARB(int containerObj,
                                                   java.nio.IntBuffer count,
                                                   java.nio.IntBuffer obj)
        Returns the handles of objects attached to containerObj in obj. . The number of objects attached to containerObj is given by OBJECT_ATTACHED_OBJECTS_ARB, which can be queried with GetObjectParameterivARB. If containerObj is not of type PROGRAM_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters count and obj will be unmodified.
        Parameters:
        containerObj - the container object to query
        count - a buffer in which to return the actual number of object handles written by the GL into obj. If NULL then the GL ignores this parameter.
        obj - a buffer in which to return the attached object handles
      • glGetUniformLocationARB

        public static int glGetUniformLocationARB(int programObj,
                                                  java.nio.ByteBuffer name)
        
        public static int glGetUniformLocationARB(int programObj,
                                                  java.lang.CharSequence name)
        
        Returns the location of uniform variable name. name has to be a null terminated string, without white space. The value of -1 will be returned if name does not correspond to an active uniform variable name in programObj or if name starts with the reserved prefix "gl_". If programObj has not been successfully linked, or if programObj is not of type PROGRAM_OBJECT_ARB, the error INVALID_OPERATION is generated. The location of a uniform variable does not change until the next link command is issued.

        A valid name cannot be a structure, an array of structures, or a subcomponent of a vector or a matrix. In order to identify a valid name, the "." (dot) and "[]" operators can be used in name to operate on a structure or to operate on an array.

        The first element of a uniform array is identified using the name of the uniform array appended with "[0]". Except if the last part of the string name indicates a uniform array, then the location of the first element of that array can be retrieved by either using the name of the uniform array, or the name of the uniform array appended with "[0]".

        Parameters:
        programObj - the program object to query
        name - the name of the uniform variable whose location is to be queried
      • glGetActiveUniformARB

        public static void glGetActiveUniformARB(int programObj,
                                                 int index,
                                                 java.nio.IntBuffer length,
                                                 java.nio.IntBuffer size,
                                                 java.nio.IntBuffer type,
                                                 java.nio.ByteBuffer name)
        Determines which of the declared uniform variables are active and their sizes and types.

        This command provides information about the uniform selected by index. The index of 0 selects the first active uniform, and index of OBJECT_ACTIVE_UNIFORMS_ARB - 1 selects the last active uniform. The value of OBJECT_ACTIVE_UNIFORMS_ARB can be queried with GetObjectParameterivARB. If index is greater than or equal to OBJECT_ACTIVE_UNIFORMS_ARB, the error INVALID_VALUE is generated.

        If an error occurred, the return parameters length, size, type and name will be unmodified.

        The returned uniform name can be the name of built-in uniform state as well. The length of the longest uniform name in programObj is given by OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB, which can be queried with GetObjectParameterivARB.

        Each uniform variable, declared in a shader, is broken down into one or more strings using the "." (dot) and "[]" operators, if necessary, to the point that it is legal to pass each string back into GetUniformLocationARB. Each of these strings constitutes one active uniform, and each string is assigned an index.

        If one or more elements of an array are active, GetActiveUniformARB will return the name of the array in name, subject to the restrictions listed above. The type of the array is returned in type. The size parameter contains the highest array element index used, plus one. The compiler or linker determines the highest index used. There will be only one active uniform reported by the GL per uniform array.

        This command will return as much information about active uniforms as possible. If no information is available, length will be set to zero and name will be an empty string. This situation could arise if GetActiveUniformARB is issued after a failed link.

        Parameters:
        programObj - a handle to a program object for which the command LinkProgramARB has been issued in the past. It is not necessary for programObj to have been linked successfully. The link could have failed because the number of active uniforms exceeded the limit.
        index - the uniform index
        length - a buffer in which to return the actual number of characters written by the GL into name. This count excludes the null termination. If length is NULL then the GL ignores this parameter.
        size - a buffer in which to return the uniform size. The size is in units of the type returned in type.
        type - a buffer in which to return the uniform type
        name - a buffer in which to return the uniform name
      • glGetActiveUniformARB

        public static java.lang.String glGetActiveUniformARB(int programObj,
                                                             int index,
                                                             int maxLength,
                                                             java.nio.IntBuffer size,
                                                             java.nio.IntBuffer type)
        Determines which of the declared uniform variables are active and their sizes and types.

        This command provides information about the uniform selected by index. The index of 0 selects the first active uniform, and index of OBJECT_ACTIVE_UNIFORMS_ARB - 1 selects the last active uniform. The value of OBJECT_ACTIVE_UNIFORMS_ARB can be queried with GetObjectParameterivARB. If index is greater than or equal to OBJECT_ACTIVE_UNIFORMS_ARB, the error INVALID_VALUE is generated.

        If an error occurred, the return parameters length, size, type and name will be unmodified.

        The returned uniform name can be the name of built-in uniform state as well. The length of the longest uniform name in programObj is given by OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB, which can be queried with GetObjectParameterivARB.

        Each uniform variable, declared in a shader, is broken down into one or more strings using the "." (dot) and "[]" operators, if necessary, to the point that it is legal to pass each string back into GetUniformLocationARB. Each of these strings constitutes one active uniform, and each string is assigned an index.

        If one or more elements of an array are active, GetActiveUniformARB will return the name of the array in name, subject to the restrictions listed above. The type of the array is returned in type. The size parameter contains the highest array element index used, plus one. The compiler or linker determines the highest index used. There will be only one active uniform reported by the GL per uniform array.

        This command will return as much information about active uniforms as possible. If no information is available, length will be set to zero and name will be an empty string. This situation could arise if GetActiveUniformARB is issued after a failed link.

        Parameters:
        programObj - a handle to a program object for which the command LinkProgramARB has been issued in the past. It is not necessary for programObj to have been linked successfully. The link could have failed because the number of active uniforms exceeded the limit.
        index - the uniform index
        maxLength - the maximum number of characters the GL is allowed to write into name.
        size - a buffer in which to return the uniform size. The size is in units of the type returned in type.
        type - a buffer in which to return the uniform type
      • glGetActiveUniformARB

        public static java.lang.String glGetActiveUniformARB(int programObj,
                                                             int index,
                                                             java.nio.IntBuffer size,
                                                             java.nio.IntBuffer type)
        Determines which of the declared uniform variables are active and their sizes and types.

        This command provides information about the uniform selected by index. The index of 0 selects the first active uniform, and index of OBJECT_ACTIVE_UNIFORMS_ARB - 1 selects the last active uniform. The value of OBJECT_ACTIVE_UNIFORMS_ARB can be queried with GetObjectParameterivARB. If index is greater than or equal to OBJECT_ACTIVE_UNIFORMS_ARB, the error INVALID_VALUE is generated.

        If an error occurred, the return parameters length, size, type and name will be unmodified.

        The returned uniform name can be the name of built-in uniform state as well. The length of the longest uniform name in programObj is given by OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB, which can be queried with GetObjectParameterivARB.

        Each uniform variable, declared in a shader, is broken down into one or more strings using the "." (dot) and "[]" operators, if necessary, to the point that it is legal to pass each string back into GetUniformLocationARB. Each of these strings constitutes one active uniform, and each string is assigned an index.

        If one or more elements of an array are active, GetActiveUniformARB will return the name of the array in name, subject to the restrictions listed above. The type of the array is returned in type. The size parameter contains the highest array element index used, plus one. The compiler or linker determines the highest index used. There will be only one active uniform reported by the GL per uniform array.

        This command will return as much information about active uniforms as possible. If no information is available, length will be set to zero and name will be an empty string. This situation could arise if GetActiveUniformARB is issued after a failed link.

        Parameters:
        programObj - a handle to a program object for which the command LinkProgramARB has been issued in the past. It is not necessary for programObj to have been linked successfully. The link could have failed because the number of active uniforms exceeded the limit.
        index - the uniform index
        size - a buffer in which to return the uniform size. The size is in units of the type returned in type.
        type - a buffer in which to return the uniform type
      • glGetUniformfvARB

        public static void glGetUniformfvARB(int programObj,
                                             int location,
                                             java.nio.FloatBuffer params)
        Returns the floating-point value or values of a uniform.
        Parameters:
        programObj - the program object to query
        location - the uniform variable location
        params - a buffer in which to return the uniform values
      • glGetUniformfARB

        public static float glGetUniformfARB(int programObj,
                                             int location)
        Returns the floating-point value or values of a uniform.
        Parameters:
        programObj - the program object to query
        location - the uniform variable location
      • glGetUniformivARB

        public static void glGetUniformivARB(int programObj,
                                             int location,
                                             java.nio.IntBuffer params)
        Returns the integer value or values of a uniform.
        Parameters:
        programObj - the program object to query
        location - the uniform variable location
        params - a buffer in which to return the uniform values
      • glGetUniformiARB

        public static int glGetUniformiARB(int programObj,
                                           int location)
        Returns the integer value or values of a uniform.
        Parameters:
        programObj - the program object to query
        location - the uniform variable location
      • glGetShaderSourceARB

        public static void glGetShaderSourceARB(int obj,
                                                java.nio.IntBuffer length,
                                                java.nio.ByteBuffer source)
        Returns the string making up the source code for a shader object.

        The string source is a concatenation of the strings passed to OpenGL using ShaderSourceARB. The length of this concatenation is given by OBJECT_SHADER_SOURCE_LENGTH_ARB, which can be queried with GetObjectParameterivARB. If obj is not of type SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters length and source will be unmodified.

        Parameters:
        obj - the shader object to query
        length - a buffer in which to return the actual number of characters written by the GL into source, excluding the null termination. If length is NULL then the GL ignores this parameter.
        source - a buffer in which to return the shader object source
      • glGetShaderSourceARB

        public static java.lang.String glGetShaderSourceARB(int obj,
                                                            int maxLength)
        Returns the string making up the source code for a shader object.

        The string source is a concatenation of the strings passed to OpenGL using ShaderSourceARB. The length of this concatenation is given by OBJECT_SHADER_SOURCE_LENGTH_ARB, which can be queried with GetObjectParameterivARB. If obj is not of type SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters length and source will be unmodified.

        Parameters:
        obj - the shader object to query
        maxLength - the maximum number of characters the GL is allowed to write into source
      • glGetShaderSourceARB

        public static java.lang.String glGetShaderSourceARB(int obj)
        Returns the string making up the source code for a shader object.

        The string source is a concatenation of the strings passed to OpenGL using ShaderSourceARB. The length of this concatenation is given by OBJECT_SHADER_SOURCE_LENGTH_ARB, which can be queried with GetObjectParameterivARB. If obj is not of type SHADER_OBJECT_ARB, the error INVALID_OPERATION is generated. If an error occurred, the return parameters length and source will be unmodified.

        Parameters:
        obj - the shader object to query
      • glShaderSourceARB

        public static void glShaderSourceARB(int shaderObj,
                                             org.lwjgl.PointerBuffer string,
                                             int[] length)
        Array version of: ShaderSourceARB
      • glUniform1fvARB

        public static void glUniform1fvARB(int location,
                                           float[] value)
        Array version of: Uniform1fvARB
      • glUniform2fvARB

        public static void glUniform2fvARB(int location,
                                           float[] value)
        Array version of: Uniform2fvARB
      • glUniform3fvARB

        public static void glUniform3fvARB(int location,
                                           float[] value)
        Array version of: Uniform3fvARB
      • glUniform4fvARB

        public static void glUniform4fvARB(int location,
                                           float[] value)
        Array version of: Uniform4fvARB
      • glUniform1ivARB

        public static void glUniform1ivARB(int location,
                                           int[] value)
        Array version of: Uniform1ivARB
      • glUniform2ivARB

        public static void glUniform2ivARB(int location,
                                           int[] value)
        Array version of: Uniform2ivARB
      • glUniform3ivARB

        public static void glUniform3ivARB(int location,
                                           int[] value)
        Array version of: Uniform3ivARB
      • glUniform4ivARB

        public static void glUniform4ivARB(int location,
                                           int[] value)
        Array version of: Uniform4ivARB
      • glUniformMatrix2fvARB

        public static void glUniformMatrix2fvARB(int location,
                                                 boolean transpose,
                                                 float[] value)
        Array version of: UniformMatrix2fvARB
      • glUniformMatrix3fvARB

        public static void glUniformMatrix3fvARB(int location,
                                                 boolean transpose,
                                                 float[] value)
        Array version of: UniformMatrix3fvARB
      • glUniformMatrix4fvARB

        public static void glUniformMatrix4fvARB(int location,
                                                 boolean transpose,
                                                 float[] value)
        Array version of: UniformMatrix4fvARB
      • glGetObjectParameterfvARB

        public static void glGetObjectParameterfvARB(int obj,
                                                     int pname,
                                                     float[] params)
        Array version of: GetObjectParameterfvARB
      • glGetObjectParameterivARB

        public static void glGetObjectParameterivARB(int obj,
                                                     int pname,
                                                     int[] params)
        Array version of: GetObjectParameterivARB
      • glGetInfoLogARB

        public static void glGetInfoLogARB(int obj,
                                           int[] length,
                                           java.nio.ByteBuffer infoLog)
        Array version of: GetInfoLogARB
      • glGetAttachedObjectsARB

        public static void glGetAttachedObjectsARB(int containerObj,
                                                   int[] count,
                                                   int[] obj)
        Array version of: GetAttachedObjectsARB
      • glGetActiveUniformARB

        public static void glGetActiveUniformARB(int programObj,
                                                 int index,
                                                 int[] length,
                                                 int[] size,
                                                 int[] type,
                                                 java.nio.ByteBuffer name)
        Array version of: GetActiveUniformARB
      • glGetUniformfvARB

        public static void glGetUniformfvARB(int programObj,
                                             int location,
                                             float[] params)
        Array version of: GetUniformfvARB
      • glGetUniformivARB

        public static void glGetUniformivARB(int programObj,
                                             int location,
                                             int[] params)
        Array version of: GetUniformivARB
      • glGetShaderSourceARB

        public static void glGetShaderSourceARB(int obj,
                                                int[] length,
                                                java.nio.ByteBuffer source)
        Array version of: GetShaderSourceARB