Class EXTGPUShader4



  • public class EXTGPUShader4
    extends java.lang.Object
    Native bindings to the EXT_gpu_shader4 extension.

    This extension provides a set of new features to the OpenGL Shading Language and related APIs to support capabilities of new hardware. In particular, this extension provides the following functionality:

    • New texture lookup functions are provided that allow shaders to access individual texels using integer coordinates referring to the texel location and level of detail. No filtering is performed. These functions allow applications to use textures as one-, two-, and three-dimensional arrays.
    • New texture lookup functions are provided that allow shaders to query the dimensions of a specific level-of-detail image of a texture object.
    • New texture lookup functions variants are provided that allow shaders to pass a constant integer vector used to offset the texel locations used during the lookup to assist in custom texture filtering operations.
    • New texture lookup functions are provided that allow shaders to access one- and two-dimensional array textures. The second, or third, coordinate is used to select the layer of the array to access.
    • New "Grad" texture lookup functions are provided that allow shaders to explicitely pass in derivative values which are used by the GL to compute the level-of-detail when performing a texture lookup.
    • A new texture lookup function is provided to access a buffer texture.
    • The existing absolute LOD texture lookup functions are no longer restricted to the vertex shader only.
    • The ability to specify and use cubemap textures with a DEPTH_COMPONENT internal format. This also enables shadow mapping on cubemaps. The 'q' coordinate is used as the reference value for comparisons. A set of new texture lookup functions is provided to lookup into shadow cubemaps.
    • The ability to specify if varying variables are interpolated in a non-perspective correct manner, if they are flat shaded or, if multi-sampling, if centroid sampling should be performed.
    • Full signed integer and unsigned integer support in the OpenGL Shading Language:
      • Integers are defined as 32 bit values using two's complement.
      • Unsigned integers and vectors thereof are added.
      • New texture lookup functions are provided that return integer values. These functions are to be used in conjunction with new texture formats whose components are actual integers, rather than integers that encode a floating-point value. To support these lookup functions, new integer and unsigned-integer sampler types are introduced.
      • Integer bitwise operators are now enabled.
      • Several built-in functions and operators now operate on integers or vectors of integers.
      • New vertex attribute functions are added that load integer attribute data and can be referenced in a vertex shader as integer data.
      • New uniform loading commands are added to load unsigned integer data.
      • Varying variables can now be (unsigned) integers. If declared as such, they have to be flat shaded.
      • Fragment shaders can define their own output variables, and declare them to be of type floating-point, integer or unsigned integer. These variables are bound to a fragment color index with the new API command BindFragDataLocationEXT(), and directed to buffers using the existing DrawBuffer or DrawBuffers API commands.
    • Added new built-in functions truncate() and round() to the shading language.
    • A new built-in variable accessible from within vertex shaders that holds the index implicitly passed to ArrayElement to specify the vertex. This is called the vertex ID.
    • A new built-in variable accessible from within fragment and geometry shaders that hold the index of the currently processed primitive. This is called the primitive ID.

    This extension also briefly mentions a new shader type, called a geometry shader. A geometry shader is run after vertices are transformed, but before clipping. A geometry shader begins with a single primitive (point, line, triangle. It can read the attributes of any of the vertices in the primitive and use them to generate new primitives. A geometry shader has a fixed output primitive type (point, line strip, or triangle strip) and emits vertices to define a new primitive. Geometry shaders are discussed in detail in the GL_EXT_geometry_shader4 specification.

    Requires OpenGL 2.0.

    • Method Detail

      • glVertexAttribI1iEXT

        public static void glVertexAttribI1iEXT(int index,
                                                int x)
        Specifies the value of a pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
      • glVertexAttribI2iEXT

        public static void glVertexAttribI2iEXT(int index,
                                                int x,
                                                int y)
        Specifies the value of a pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
        y - the vertex attribute y component
      • glVertexAttribI3iEXT

        public static void glVertexAttribI3iEXT(int index,
                                                int x,
                                                int y,
                                                int z)
        Specifies the value of a pure integer generic vertex attribute. The w component is implicitly set to 1.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
        y - the vertex attribute y component
        z - the vertex attribute z component
      • glVertexAttribI4iEXT

        public static void glVertexAttribI4iEXT(int index,
                                                int x,
                                                int y,
                                                int z,
                                                int w)
        Specifies the value of a pure integer generic vertex attribute.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
        y - the vertex attribute y component
        z - the vertex attribute z component
        w - the vertex attribute w component
      • glVertexAttribI1uiEXT

        public static void glVertexAttribI1uiEXT(int index,
                                                 int x)
        Specifies the value of an unsigned pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
      • glVertexAttribI2uiEXT

        public static void glVertexAttribI2uiEXT(int index,
                                                 int x,
                                                 int y)
        Specifies the value of an unsigned pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
        y - the vertex attribute y component
      • glVertexAttribI3uiEXT

        public static void glVertexAttribI3uiEXT(int index,
                                                 int x,
                                                 int y,
                                                 int z)
        Specifies the value of an unsigned pure integer generic vertex attribute. The w component is implicitly set to 1.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
        y - the vertex attribute y component
        z - the vertex attribute z component
      • glVertexAttribI4uiEXT

        public static void glVertexAttribI4uiEXT(int index,
                                                 int x,
                                                 int y,
                                                 int z,
                                                 int w)
        Specifies the value of an unsigned pure integer generic vertex attribute.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        x - the vertex attribute x component
        y - the vertex attribute y component
        z - the vertex attribute z component
        w - the vertex attribute w component
      • glVertexAttribI1ivEXT

        public static void glVertexAttribI1ivEXT(int index,
                                                 java.nio.IntBuffer v)
        Pointer version of VertexAttribI1iEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI2ivEXT

        public static void glVertexAttribI2ivEXT(int index,
                                                 java.nio.IntBuffer v)
        Pointer version of VertexAttribI2iEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI3ivEXT

        public static void glVertexAttribI3ivEXT(int index,
                                                 java.nio.IntBuffer v)
        Pointer version of VertexAttribI3iEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI4ivEXT

        public static void glVertexAttribI4ivEXT(int index,
                                                 java.nio.IntBuffer v)
        Pointer version of VertexAttribI4iEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI1uivEXT

        public static void glVertexAttribI1uivEXT(int index,
                                                  java.nio.IntBuffer v)
        Pointer version of VertexAttribI1uiEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI2uivEXT

        public static void glVertexAttribI2uivEXT(int index,
                                                  java.nio.IntBuffer v)
        Pointer version of VertexAttribI2uiEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI3uivEXT

        public static void glVertexAttribI3uivEXT(int index,
                                                  java.nio.IntBuffer v)
        Pointer version of VertexAttribI3uiEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI4uivEXT

        public static void glVertexAttribI4uivEXT(int index,
                                                  java.nio.IntBuffer v)
        Pointer version of VertexAttribI4uiEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI4bvEXT

        public static void glVertexAttribI4bvEXT(int index,
                                                 java.nio.ByteBuffer v)
        Byte version of VertexAttribI4ivEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI4svEXT

        public static void glVertexAttribI4svEXT(int index,
                                                 java.nio.ShortBuffer v)
        Short version of VertexAttribI4ivEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI4ubvEXT

        public static void glVertexAttribI4ubvEXT(int index,
                                                  java.nio.ByteBuffer v)
        Byte version of VertexAttribI4uivEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribI4usvEXT

        public static void glVertexAttribI4usvEXT(int index,
                                                  java.nio.ShortBuffer v)
        Short version of VertexAttribI4uivEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        v - the pure integer vertex attribute buffer
      • glVertexAttribIPointerEXT

        public static void glVertexAttribIPointerEXT(int index,
                                                     int size,
                                                     int type,
                                                     int stride,
                                                     java.nio.ByteBuffer pointer)
        
        public static void glVertexAttribIPointerEXT(int index,
                                                     int size,
                                                     int type,
                                                     int stride,
                                                     long pointer)
        
        public static void glVertexAttribIPointerEXT(int index,
                                                     int size,
                                                     int type,
                                                     int stride,
                                                     java.nio.ShortBuffer pointer)
        
        public static void glVertexAttribIPointerEXT(int index,
                                                     int size,
                                                     int type,
                                                     int stride,
                                                     java.nio.IntBuffer pointer)
        
        Specifies the location and organization of a pure integer vertex attribute array.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        size - the number of values per vertex that are stored in the array. The initial value is 4. One of:
        1234BGRA
        type - the data type of each component in the array. One of:
        BYTEUNSIGNED_BYTESHORTUNSIGNED_SHORTINTUNSIGNED_INT
        stride - the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in the array. The initial value is 0.
        pointer - the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer currently bound to the ARRAY_BUFFER target. The initial value is 0.
      • glGetVertexAttribIivEXT

        public static void glGetVertexAttribIivEXT(int index,
                                                   int pname,
                                                   java.nio.IntBuffer params)
        Returns the value of a pure integer generic vertex attribute parameter.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        pname - the symbolic name of the vertex attribute parameter to be queried
        params - returns the requested data
      • glGetVertexAttribIiEXT

        public static int glGetVertexAttribIiEXT(int index,
                                                 int pname)
        Returns the value of a pure integer generic vertex attribute parameter.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        pname - the symbolic name of the vertex attribute parameter to be queried
      • glGetVertexAttribIuivEXT

        public static void glGetVertexAttribIuivEXT(int index,
                                                    int pname,
                                                    java.nio.IntBuffer params)
        Unsigned version of GetVertexAttribIivEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        pname - the symbolic name of the vertex attribute parameter to be queried
        params - returns the requested data
      • glGetVertexAttribIuiEXT

        public static int glGetVertexAttribIuiEXT(int index,
                                                  int pname)
        Unsigned version of GetVertexAttribIivEXT.
        Parameters:
        index - the index of the pure integer generic vertex attribute to be modified
        pname - the symbolic name of the vertex attribute parameter to be queried
      • glGetUniformuivEXT

        public static void glGetUniformuivEXT(int program,
                                              int location,
                                              java.nio.IntBuffer params)
      • glGetUniformuiEXT

        public static int glGetUniformuiEXT(int program,
                                            int location)
      • glBindFragDataLocationEXT

        public static void glBindFragDataLocationEXT(int program,
                                                     int color,
                                                     java.nio.ByteBuffer name)
      • glBindFragDataLocationEXT

        public static void glBindFragDataLocationEXT(int program,
                                                     int color,
                                                     java.lang.CharSequence name)
      • glGetFragDataLocationEXT

        public static int glGetFragDataLocationEXT(int program,
                                                   java.nio.ByteBuffer name)
      • glGetFragDataLocationEXT

        public static int glGetFragDataLocationEXT(int program,
                                                   java.lang.CharSequence name)
      • glUniform1uiEXT

        public static void glUniform1uiEXT(int location,
                                           int v0)
      • glUniform2uiEXT

        public static void glUniform2uiEXT(int location,
                                           int v0,
                                           int v1)
      • glUniform3uiEXT

        public static void glUniform3uiEXT(int location,
                                           int v0,
                                           int v1,
                                           int v2)
      • glUniform4uiEXT

        public static void glUniform4uiEXT(int location,
                                           int v0,
                                           int v1,
                                           int v2,
                                           int v3)
      • glUniform1uivEXT

        public static void glUniform1uivEXT(int location,
                                            java.nio.IntBuffer value)
      • glUniform2uivEXT

        public static void glUniform2uivEXT(int location,
                                            java.nio.IntBuffer value)
      • glUniform3uivEXT

        public static void glUniform3uivEXT(int location,
                                            java.nio.IntBuffer value)
      • glUniform4uivEXT

        public static void glUniform4uivEXT(int location,
                                            java.nio.IntBuffer value)
      • glVertexAttribI1ivEXT

        public static void glVertexAttribI1ivEXT(int index,
                                                 int[] v)
        Array version of: VertexAttribI1ivEXT
      • glVertexAttribI2ivEXT

        public static void glVertexAttribI2ivEXT(int index,
                                                 int[] v)
        Array version of: VertexAttribI2ivEXT
      • glVertexAttribI3ivEXT

        public static void glVertexAttribI3ivEXT(int index,
                                                 int[] v)
        Array version of: VertexAttribI3ivEXT
      • glVertexAttribI4ivEXT

        public static void glVertexAttribI4ivEXT(int index,
                                                 int[] v)
        Array version of: VertexAttribI4ivEXT
      • glVertexAttribI1uivEXT

        public static void glVertexAttribI1uivEXT(int index,
                                                  int[] v)
        Array version of: VertexAttribI1uivEXT
      • glVertexAttribI2uivEXT

        public static void glVertexAttribI2uivEXT(int index,
                                                  int[] v)
        Array version of: VertexAttribI2uivEXT
      • glVertexAttribI3uivEXT

        public static void glVertexAttribI3uivEXT(int index,
                                                  int[] v)
        Array version of: VertexAttribI3uivEXT
      • glVertexAttribI4uivEXT

        public static void glVertexAttribI4uivEXT(int index,
                                                  int[] v)
        Array version of: VertexAttribI4uivEXT
      • glVertexAttribI4svEXT

        public static void glVertexAttribI4svEXT(int index,
                                                 short[] v)
        Array version of: VertexAttribI4svEXT
      • glVertexAttribI4usvEXT

        public static void glVertexAttribI4usvEXT(int index,
                                                  short[] v)
        Array version of: VertexAttribI4usvEXT
      • glVertexAttribIPointerEXT

        public static void glVertexAttribIPointerEXT(int index,
                                                     int size,
                                                     int type,
                                                     int stride,
                                                     short[] pointer)
        
        public static void glVertexAttribIPointerEXT(int index,
                                                     int size,
                                                     int type,
                                                     int stride,
                                                     int[] pointer)
        
        Array version of: VertexAttribIPointerEXT
      • glGetVertexAttribIivEXT

        public static void glGetVertexAttribIivEXT(int index,
                                                   int pname,
                                                   int[] params)
        Array version of: GetVertexAttribIivEXT
      • glGetVertexAttribIuivEXT

        public static void glGetVertexAttribIuivEXT(int index,
                                                    int pname,
                                                    int[] params)
        Array version of: GetVertexAttribIuivEXT
      • glGetUniformuivEXT

        public static void glGetUniformuivEXT(int program,
                                              int location,
                                              int[] params)
        Array version of: GetUniformuivEXT
      • glUniform1uivEXT

        public static void glUniform1uivEXT(int location,
                                            int[] value)
        Array version of: Uniform1uivEXT
      • glUniform2uivEXT

        public static void glUniform2uivEXT(int location,
                                            int[] value)
        Array version of: Uniform2uivEXT
      • glUniform3uivEXT

        public static void glUniform3uivEXT(int location,
                                            int[] value)
        Array version of: Uniform3uivEXT
      • glUniform4uivEXT

        public static void glUniform4uivEXT(int location,
                                            int[] value)
        Array version of: Uniform4uivEXT