Class GL31

    • Method Detail

      • glCopyBufferSubData

        public static void glCopyBufferSubData(int readTarget,
                                               int writeTarget,
                                               long readOffset,
                                               long writeOffset,
                                               long size)

        OpenGL SDK Reference

        Copies all or part of one buffer object's data store to the data store of another buffer object.

        An INVALID_VALUE error is generated if any of readoffset, writeoffset, or size are negative, if readoffset+size exceeds the size of the buffer object bound to readtarget, or if writeoffset+size exceeds the size of the buffer object bound to writetarget.

        An INVALID_VALUE error is generated if the same buffer object is bound to both readtarget and writetarget, and the ranges [readoffset, readoffset+size) and [writeoffset, writeoffset+size) overlap.

        An INVALID_OPERATION error is generated if zero is bound to readtarget or writetarget.

        An INVALID_OPERATION error is generated if the buffer objects bound to either readtarget or writetarget are mapped.

        Parameters:
        readTarget - the source buffer object target. One of:
        ARRAY_BUFFERCOPY_READ_BUFFERCOPY_WRITE_BUFFERELEMENT_ARRAY_BUFFER
        PIXEL_PACK_BUFFERPIXEL_UNPACK_BUFFERTRANSFORM_FEEDBACK_BUFFERTEXTURE_BUFFER
        UNIFORM_BUFFER
        writeTarget - the destination buffer object target
        readOffset - the source buffer object offset, in bytes
        writeOffset - the destination buffer object offset, in bytes
        size - the number of bytes to copy
      • glPrimitiveRestartIndex

        public static void glPrimitiveRestartIndex(int index)

        OpenGL SDK Reference

        Specifies the primitive restart index.
        Parameters:
        index - the value to be interpreted as the primitive restart index
      • glTexBuffer

        public static void glTexBuffer(int target,
                                       int internalformat,
                                       int buffer)

        OpenGL SDK Reference

        Attaches the storage for the buffer object named buffer to the active buffer texture, and specifies an internal format for the texel array found in the attached buffer object. If buffer is zero, any buffer object attached to the buffer texture is detached, and no new buffer object is attached. If buffer is non-zero, but is not the name of an existing buffer object, the error INVALID_OPERATION is generated.

        When a buffer object is attached to a buffer texture, the buffer object's data store is taken as the texture's texel array. The number of texels in the buffer texture's texel array is given by

        floor(buffer_size / (components * sizeof(base_type)),

        where buffer_size is the size of the buffer object, in basic machine units and components and base_type are the element count and base data type for elements. The number of texels in the texel array is then clamped to the implementation-dependent limit MAX_TEXTURE_BUFFER_SIZE. When a buffer texture is accessed in a shader, the results of a texel fetch are undefined if the specified texel number is greater than or equal to the clamped number of texels in the texel array.

        When a buffer texture is accessed in a shader, an integer is provided to indicate the texel number being accessed. If no buffer object is bound to the buffer texture, the results of the texel access are undefined. Otherwise, the attached buffer object's data store is interpreted as an array of elements of the GL data type corresponding to internalformat. Each texel consists of one to four elements that are mapped to texture components (R, G, B, A, L, and I). Element m of the texel numbered n is taken from element n * components + m of the attached buffer object's data store. Elements and texels are both numbered starting with zero. For texture formats with normalized components, the extracted values are converted to floating-point values. The components of the texture are then converted to an (R,G,B,A) vector, and returned to the shader as a four-component result vector with components of the appropriate data type for the texture's internal format.

        Parameters:
        target - the target of the operation. Must be:
        TEXTURE_BUFFER
        internalformat - the sized internal format of the data in the store belonging to buffer
        buffer - the name of the buffer object whose storage to attach to the active buffer texture
      • glGetUniformIndices

        public static void glGetUniformIndices(int program,
                                               org.lwjgl.PointerBuffer uniformNames,
                                               java.nio.IntBuffer uniformIndices)
        
        public static void glGetUniformIndices(int program,
                                               java.lang.CharSequence[] uniformNames,
                                               java.nio.IntBuffer uniformIndices)
        

        OpenGL SDK Reference

        Retrieves the indices of a number of uniforms within a program object
        Parameters:
        program - the name of a program containing uniforms whose indices to query
        uniformNames - an array of pointers to buffers containing the names of the queried uniforms
        uniformIndices - an array that will receive the indices of the uniforms
      • glGetUniformIndices

        public static int glGetUniformIndices(int program,
                                              java.lang.CharSequence uniformName)

        OpenGL SDK Reference

        Retrieves the indices of a number of uniforms within a program object
        Parameters:
        program - the name of a program containing uniforms whose indices to query
      • glGetActiveUniformsiv

        public static void glGetActiveUniformsiv(int program,
                                                 java.nio.IntBuffer uniformIndices,
                                                 int pname,
                                                 java.nio.IntBuffer params)

        OpenGL SDK Reference

        Returns information about several active uniform variables for the specified program object.
        Parameters:
        program - the program object to be queried
        uniformIndices - an array of uniformCount integers containing the indices of uniforms within program
        pname - the property of the each uniform in uniformIndices that should be written into the corresponding element of params
        params - an array of uniformCount integers which are to receive the value of pname for each uniform in uniformIndices
      • glGetActiveUniformsi

        public static int glGetActiveUniformsi(int program,
                                               int uniformIndex,
                                               int pname)

        OpenGL SDK Reference

        Returns information about several active uniform variables for the specified program object.
        Parameters:
        program - the program object to be queried
        pname - the property of the each uniform in uniformIndices that should be written into the corresponding element of params
      • glGetActiveUniformName

        public static void glGetActiveUniformName(int program,
                                                  int uniformIndex,
                                                  java.nio.IntBuffer length,
                                                  java.nio.ByteBuffer uniformName)

        OpenGL SDK Reference

        Queries the name of an active uniform.
        Parameters:
        program - the program containing the active uniform index uniformIndex
        uniformIndex - the index of the active uniform whose name to query
        length - the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by uniformName
        uniformName - the address of a buffer into which the GL will place the name of the active uniform at uniformIndex within program
      • glGetActiveUniformName

        public static java.lang.String glGetActiveUniformName(int program,
                                                              int uniformIndex,
                                                              int bufSize)

        OpenGL SDK Reference

        Queries the name of an active uniform.
        Parameters:
        program - the program containing the active uniform index uniformIndex
        uniformIndex - the index of the active uniform whose name to query
        bufSize - the size of the buffer, in units of GLchar, of the buffer whose address is specified in uniformName
      • glGetActiveUniformName

        public static java.lang.String glGetActiveUniformName(int program,
                                                              int uniformIndex)

        OpenGL SDK Reference

        Queries the name of an active uniform.
        Parameters:
        program - the program containing the active uniform index uniformIndex
        uniformIndex - the index of the active uniform whose name to query
      • glGetUniformBlockIndex

        public static int glGetUniformBlockIndex(int program,
                                                 java.nio.ByteBuffer uniformBlockName)
        
        public static int glGetUniformBlockIndex(int program,
                                                 java.lang.CharSequence uniformBlockName)
        

        OpenGL SDK Reference

        Retrieves the index of a named uniform block.
        Parameters:
        program - the name of a program containing the uniform block
        uniformBlockName - an array of characters to containing the name of the uniform block whose index to retrieve
      • glGetActiveUniformBlockName

        public static void glGetActiveUniformBlockName(int program,
                                                       int uniformBlockIndex,
                                                       java.nio.IntBuffer length,
                                                       java.nio.ByteBuffer uniformBlockName)

        OpenGL SDK Reference

        Retrieves the name of an active uniform block.
        Parameters:
        program - the name of a program containing the uniform block
        uniformBlockIndex - the index of the uniform block within program
        length - the address of a variable to receive the number of characters that were written to uniformBlockName
        uniformBlockName - an array of characters to receive the name of the uniform block at uniformBlockIndex
      • glGetActiveUniformBlockName

        public static java.lang.String glGetActiveUniformBlockName(int program,
                                                                   int uniformBlockIndex,
                                                                   int bufSize)

        OpenGL SDK Reference

        Retrieves the name of an active uniform block.
        Parameters:
        program - the name of a program containing the uniform block
        uniformBlockIndex - the index of the uniform block within program
        bufSize - the size of the buffer addressed by uniformBlockName
      • glGetActiveUniformBlockName

        public static java.lang.String glGetActiveUniformBlockName(int program,
                                                                   int uniformBlockIndex)

        OpenGL SDK Reference

        Retrieves the name of an active uniform block.
        Parameters:
        program - the name of a program containing the uniform block
        uniformBlockIndex - the index of the uniform block within program
      • glUniformBlockBinding

        public static void glUniformBlockBinding(int program,
                                                 int uniformBlockIndex,
                                                 int uniformBlockBinding)

        OpenGL SDK Reference

        Assigns a binding point to an active uniform block.
        Parameters:
        program - the name of a program object containing the active uniform block whose binding to assign
        uniformBlockIndex - the index of the active uniform block within program whose binding to assign
        uniformBlockBinding - the binding point to which to bind the uniform block with index uniformBlockIndex within program
      • glGetUniformIndices

        public static void glGetUniformIndices(int program,
                                               org.lwjgl.PointerBuffer uniformNames,
                                               int[] uniformIndices)
      • glGetActiveUniformName

        public static void glGetActiveUniformName(int program,
                                                  int uniformIndex,
                                                  int[] length,
                                                  java.nio.ByteBuffer uniformName)
      • glGetActiveUniformBlockName

        public static void glGetActiveUniformBlockName(int program,
                                                       int uniformBlockIndex,
                                                       int[] length,
                                                       java.nio.ByteBuffer uniformBlockName)