Class EXTSeparateShaderObjects


  • public class EXTSeparateShaderObjects
    extends java.lang.Object
    Native bindings to the EXT_separate_shader_objects extension.

    This extension is a subset of ARB_separate_shader_objects appropriate for OpenGL ES, and also tacks on ARB_explicit_attrib_location functionality.

    Conventional GLSL requires multiple shader stages (vertex and fragment) to be linked into a single monolithic program object to specify a GLSL shader for each stage.

    While GLSL's monolithic approach has some advantages for optimizing shaders as a unit that span multiple stages, GPU hardware supports a more flexible mix-and-match approach to specifying shaders independently for these different shader stages. Many developers build their shader content around the mix-and-match approach where they can use a single vertex shader with multiple fragment shaders (or vice versa).

    This extension adopts a "mix-and-match" shader stage model for GLSL allowing multiple different GLSL program objects to be bound at once each to an individual rendering pipeline stage independently of other stage bindings. This allows program objects to contain only the shader stages that best suit the application's needs.

    This extension introduces the program pipeline object that serves as a container for the program bound to any particular rendering stage. It can be bound, unbound, and rebound to simply save and restore the complete shader stage to program object bindings. Like framebuffer and vertex array objects, program pipeline objects are "container" objects that are not shared between contexts.

    To bind a program object to a specific shader stage or set of stages, UseProgramStagesEXT is used. The VERTEX_SHADER_BIT_EXT and FRAGMENT_SHADER_BIT_EXT tokens refer to the conventional vertex and fragment stages, respectively. ActiveShaderProgramEXT specifies the program that Uniform* commands will update.

    While ActiveShaderProgramEXT provides a selector for setting and querying uniform values of a program object with the conventional Uniform* commands, the ProgramUniform* commands provide a selector-free way to modify uniforms of a GLSL program object without an explicit bind. This selector-free model reduces API overhead and provides a cleaner interface for applications.

    Separate linking creates the possibility that certain output varyings of a shader may go unread by the subsequent shader input varyings. In this case, the output varyings are simply ignored. It is also possible input varyings from a shader may not be written as output varyings of a preceding shader. In this case, the unwritten input varying values are undefined.

    This extension also introduces a layout location qualifier to GLSL to pre- assign attribute and varying locations to shader variables. This allows applications to globally assign a particular semantic meaning, such as diffuse color or vertex normal, to a particular attribute and/or varying location without knowing how that variable will be named in any particular shader.

    Requires GLES 2.0.

    • Method Detail

      • glActiveShaderProgramEXT

        public static void glActiveShaderProgramEXT​(int pipeline,
                                                    int program)
      • glBindProgramPipelineEXT

        public static void glBindProgramPipelineEXT​(int pipeline)
      • nglCreateShaderProgramvEXT

        public static int nglCreateShaderProgramvEXT​(int type,
                                                     int count,
                                                     long strings)
      • glCreateShaderProgramvEXT

        public static int glCreateShaderProgramvEXT​(int type,
                                                    PointerBuffer strings)
      • glCreateShaderProgramvEXT

        public static int glCreateShaderProgramvEXT​(int type,
                                                    java.lang.CharSequence... strings)
      • glCreateShaderProgramvEXT

        public static int glCreateShaderProgramvEXT​(int type,
                                                    java.lang.CharSequence string)
      • nglDeleteProgramPipelinesEXT

        public static void nglDeleteProgramPipelinesEXT​(int n,
                                                        long pipelines)
      • glDeleteProgramPipelinesEXT

        public static void glDeleteProgramPipelinesEXT​(java.nio.IntBuffer pipelines)
      • glDeleteProgramPipelinesEXT

        public static void glDeleteProgramPipelinesEXT​(int pipeline)
      • nglGenProgramPipelinesEXT

        public static void nglGenProgramPipelinesEXT​(int n,
                                                     long pipelines)
      • glGenProgramPipelinesEXT

        public static void glGenProgramPipelinesEXT​(java.nio.IntBuffer pipelines)
      • glGenProgramPipelinesEXT

        public static int glGenProgramPipelinesEXT()
      • nglGetProgramPipelineInfoLogEXT

        public static void nglGetProgramPipelineInfoLogEXT​(int pipeline,
                                                           int bufSize,
                                                           long length,
                                                           long infoLog)
      • glGetProgramPipelineInfoLogEXT

        public static void glGetProgramPipelineInfoLogEXT​(int pipeline,
                                                          @Nullable
                                                          java.nio.IntBuffer length,
                                                          java.nio.ByteBuffer infoLog)
      • glGetProgramPipelineInfoLogEXT

        public static java.lang.String glGetProgramPipelineInfoLogEXT​(int pipeline,
                                                                      int bufSize)
      • glGetProgramPipelineInfoLogEXT

        public static java.lang.String glGetProgramPipelineInfoLogEXT​(int pipeline)
      • nglGetProgramPipelineivEXT

        public static void nglGetProgramPipelineivEXT​(int pipeline,
                                                      int pname,
                                                      long params)
      • glGetProgramPipelineivEXT

        public static void glGetProgramPipelineivEXT​(int pipeline,
                                                     int pname,
                                                     java.nio.IntBuffer params)
      • glGetProgramPipelineiEXT

        public static int glGetProgramPipelineiEXT​(int pipeline,
                                                   int pname)
      • glIsProgramPipelineEXT

        public static boolean glIsProgramPipelineEXT​(int pipeline)
      • glProgramParameteriEXT

        public static void glProgramParameteriEXT​(int program,
                                                  int pname,
                                                  int value)
      • glProgramUniform1fEXT

        public static void glProgramUniform1fEXT​(int program,
                                                 int location,
                                                 float v0)
      • nglProgramUniform1fvEXT

        public static void nglProgramUniform1fvEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform1fvEXT

        public static void glProgramUniform1fvEXT​(int program,
                                                  int location,
                                                  java.nio.FloatBuffer value)
      • glProgramUniform1iEXT

        public static void glProgramUniform1iEXT​(int program,
                                                 int location,
                                                 int v0)
      • nglProgramUniform1ivEXT

        public static void nglProgramUniform1ivEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform1ivEXT

        public static void glProgramUniform1ivEXT​(int program,
                                                  int location,
                                                  java.nio.IntBuffer value)
      • glProgramUniform2fEXT

        public static void glProgramUniform2fEXT​(int program,
                                                 int location,
                                                 float v0,
                                                 float v1)
      • nglProgramUniform2fvEXT

        public static void nglProgramUniform2fvEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform2fvEXT

        public static void glProgramUniform2fvEXT​(int program,
                                                  int location,
                                                  java.nio.FloatBuffer value)
      • glProgramUniform2iEXT

        public static void glProgramUniform2iEXT​(int program,
                                                 int location,
                                                 int v0,
                                                 int v1)
      • nglProgramUniform2ivEXT

        public static void nglProgramUniform2ivEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform2ivEXT

        public static void glProgramUniform2ivEXT​(int program,
                                                  int location,
                                                  java.nio.IntBuffer value)
      • glProgramUniform3fEXT

        public static void glProgramUniform3fEXT​(int program,
                                                 int location,
                                                 float v0,
                                                 float v1,
                                                 float v2)
      • nglProgramUniform3fvEXT

        public static void nglProgramUniform3fvEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform3fvEXT

        public static void glProgramUniform3fvEXT​(int program,
                                                  int location,
                                                  java.nio.FloatBuffer value)
      • glProgramUniform3iEXT

        public static void glProgramUniform3iEXT​(int program,
                                                 int location,
                                                 int v0,
                                                 int v1,
                                                 int v2)
      • nglProgramUniform3ivEXT

        public static void nglProgramUniform3ivEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform3ivEXT

        public static void glProgramUniform3ivEXT​(int program,
                                                  int location,
                                                  java.nio.IntBuffer value)
      • glProgramUniform4fEXT

        public static void glProgramUniform4fEXT​(int program,
                                                 int location,
                                                 float v0,
                                                 float v1,
                                                 float v2,
                                                 float v3)
      • nglProgramUniform4fvEXT

        public static void nglProgramUniform4fvEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform4fvEXT

        public static void glProgramUniform4fvEXT​(int program,
                                                  int location,
                                                  java.nio.FloatBuffer value)
      • glProgramUniform4iEXT

        public static void glProgramUniform4iEXT​(int program,
                                                 int location,
                                                 int v0,
                                                 int v1,
                                                 int v2,
                                                 int v3)
      • nglProgramUniform4ivEXT

        public static void nglProgramUniform4ivEXT​(int program,
                                                   int location,
                                                   int count,
                                                   long value)
      • glProgramUniform4ivEXT

        public static void glProgramUniform4ivEXT​(int program,
                                                  int location,
                                                  java.nio.IntBuffer value)
      • nglProgramUniformMatrix2fvEXT

        public static void nglProgramUniformMatrix2fvEXT​(int program,
                                                         int location,
                                                         int count,
                                                         boolean transpose,
                                                         long value)
      • glProgramUniformMatrix2fvEXT

        public static void glProgramUniformMatrix2fvEXT​(int program,
                                                        int location,
                                                        boolean transpose,
                                                        java.nio.FloatBuffer value)
      • nglProgramUniformMatrix3fvEXT

        public static void nglProgramUniformMatrix3fvEXT​(int program,
                                                         int location,
                                                         int count,
                                                         boolean transpose,
                                                         long value)
      • glProgramUniformMatrix3fvEXT

        public static void glProgramUniformMatrix3fvEXT​(int program,
                                                        int location,
                                                        boolean transpose,
                                                        java.nio.FloatBuffer value)
      • nglProgramUniformMatrix4fvEXT

        public static void nglProgramUniformMatrix4fvEXT​(int program,
                                                         int location,
                                                         int count,
                                                         boolean transpose,
                                                         long value)
      • glProgramUniformMatrix4fvEXT

        public static void glProgramUniformMatrix4fvEXT​(int program,
                                                        int location,
                                                        boolean transpose,
                                                        java.nio.FloatBuffer value)
      • glUseProgramStagesEXT

        public static void glUseProgramStagesEXT​(int pipeline,
                                                 int stages,
                                                 int program)
      • glValidateProgramPipelineEXT

        public static void glValidateProgramPipelineEXT​(int pipeline)
      • glProgramUniform1uiEXT

        public static void glProgramUniform1uiEXT​(int program,
                                                  int location,
                                                  int v0)
      • glProgramUniform2uiEXT

        public static void glProgramUniform2uiEXT​(int program,
                                                  int location,
                                                  int v0,
                                                  int v1)
      • glProgramUniform3uiEXT

        public static void glProgramUniform3uiEXT​(int program,
                                                  int location,
                                                  int v0,
                                                  int v1,
                                                  int v2)
      • glProgramUniform4uiEXT

        public static void glProgramUniform4uiEXT​(int program,
                                                  int location,
                                                  int v0,
                                                  int v1,
                                                  int v2,
                                                  int v3)
      • nglProgramUniform1uivEXT

        public static void nglProgramUniform1uivEXT​(int program,
                                                    int location,
                                                    int count,
                                                    long value)
      • glProgramUniform1uivEXT

        public static void glProgramUniform1uivEXT​(int program,
                                                   int location,
                                                   java.nio.IntBuffer value)
      • nglProgramUniform2uivEXT

        public static void nglProgramUniform2uivEXT​(int program,
                                                    int location,
                                                    int count,
                                                    long value)
      • glProgramUniform2uivEXT

        public static void glProgramUniform2uivEXT​(int program,
                                                   int location,
                                                   java.nio.IntBuffer value)
      • nglProgramUniform3uivEXT

        public static void nglProgramUniform3uivEXT​(int program,
                                                    int location,
                                                    int count,
                                                    long value)
      • glProgramUniform3uivEXT

        public static void glProgramUniform3uivEXT​(int program,
                                                   int location,
                                                   java.nio.IntBuffer value)
      • nglProgramUniform4uivEXT

        public static void nglProgramUniform4uivEXT​(int program,
                                                    int location,
                                                    int count,
                                                    long value)
      • glProgramUniform4uivEXT

        public static void glProgramUniform4uivEXT​(int program,
                                                   int location,
                                                   java.nio.IntBuffer value)
      • nglProgramUniformMatrix2x3fvEXT

        public static void nglProgramUniformMatrix2x3fvEXT​(int program,
                                                           int location,
                                                           int count,
                                                           boolean transpose,
                                                           long value)
      • glProgramUniformMatrix2x3fvEXT

        public static void glProgramUniformMatrix2x3fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          java.nio.FloatBuffer value)
      • nglProgramUniformMatrix3x2fvEXT

        public static void nglProgramUniformMatrix3x2fvEXT​(int program,
                                                           int location,
                                                           int count,
                                                           boolean transpose,
                                                           long value)
      • glProgramUniformMatrix3x2fvEXT

        public static void glProgramUniformMatrix3x2fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          java.nio.FloatBuffer value)
      • nglProgramUniformMatrix2x4fvEXT

        public static void nglProgramUniformMatrix2x4fvEXT​(int program,
                                                           int location,
                                                           int count,
                                                           boolean transpose,
                                                           long value)
      • glProgramUniformMatrix2x4fvEXT

        public static void glProgramUniformMatrix2x4fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          java.nio.FloatBuffer value)
      • nglProgramUniformMatrix4x2fvEXT

        public static void nglProgramUniformMatrix4x2fvEXT​(int program,
                                                           int location,
                                                           int count,
                                                           boolean transpose,
                                                           long value)
      • glProgramUniformMatrix4x2fvEXT

        public static void glProgramUniformMatrix4x2fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          java.nio.FloatBuffer value)
      • nglProgramUniformMatrix3x4fvEXT

        public static void nglProgramUniformMatrix3x4fvEXT​(int program,
                                                           int location,
                                                           int count,
                                                           boolean transpose,
                                                           long value)
      • glProgramUniformMatrix3x4fvEXT

        public static void glProgramUniformMatrix3x4fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          java.nio.FloatBuffer value)
      • nglProgramUniformMatrix4x3fvEXT

        public static void nglProgramUniformMatrix4x3fvEXT​(int program,
                                                           int location,
                                                           int count,
                                                           boolean transpose,
                                                           long value)
      • glProgramUniformMatrix4x3fvEXT

        public static void glProgramUniformMatrix4x3fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          java.nio.FloatBuffer value)
      • glDeleteProgramPipelinesEXT

        public static void glDeleteProgramPipelinesEXT​(int[] pipelines)
        Array version of: DeleteProgramPipelinesEXT
      • glGenProgramPipelinesEXT

        public static void glGenProgramPipelinesEXT​(int[] pipelines)
        Array version of: GenProgramPipelinesEXT
      • glGetProgramPipelineInfoLogEXT

        public static void glGetProgramPipelineInfoLogEXT​(int pipeline,
                                                          @Nullable
                                                          int[] length,
                                                          java.nio.ByteBuffer infoLog)
      • glGetProgramPipelineivEXT

        public static void glGetProgramPipelineivEXT​(int pipeline,
                                                     int pname,
                                                     int[] params)
        Array version of: GetProgramPipelineivEXT
      • glProgramUniform1fvEXT

        public static void glProgramUniform1fvEXT​(int program,
                                                  int location,
                                                  float[] value)
        Array version of: ProgramUniform1fvEXT
      • glProgramUniform1ivEXT

        public static void glProgramUniform1ivEXT​(int program,
                                                  int location,
                                                  int[] value)
        Array version of: ProgramUniform1ivEXT
      • glProgramUniform2fvEXT

        public static void glProgramUniform2fvEXT​(int program,
                                                  int location,
                                                  float[] value)
        Array version of: ProgramUniform2fvEXT
      • glProgramUniform2ivEXT

        public static void glProgramUniform2ivEXT​(int program,
                                                  int location,
                                                  int[] value)
        Array version of: ProgramUniform2ivEXT
      • glProgramUniform3fvEXT

        public static void glProgramUniform3fvEXT​(int program,
                                                  int location,
                                                  float[] value)
        Array version of: ProgramUniform3fvEXT
      • glProgramUniform3ivEXT

        public static void glProgramUniform3ivEXT​(int program,
                                                  int location,
                                                  int[] value)
        Array version of: ProgramUniform3ivEXT
      • glProgramUniform4fvEXT

        public static void glProgramUniform4fvEXT​(int program,
                                                  int location,
                                                  float[] value)
        Array version of: ProgramUniform4fvEXT
      • glProgramUniform4ivEXT

        public static void glProgramUniform4ivEXT​(int program,
                                                  int location,
                                                  int[] value)
        Array version of: ProgramUniform4ivEXT
      • glProgramUniformMatrix2fvEXT

        public static void glProgramUniformMatrix2fvEXT​(int program,
                                                        int location,
                                                        boolean transpose,
                                                        float[] value)
        Array version of: ProgramUniformMatrix2fvEXT
      • glProgramUniformMatrix3fvEXT

        public static void glProgramUniformMatrix3fvEXT​(int program,
                                                        int location,
                                                        boolean transpose,
                                                        float[] value)
        Array version of: ProgramUniformMatrix3fvEXT
      • glProgramUniformMatrix4fvEXT

        public static void glProgramUniformMatrix4fvEXT​(int program,
                                                        int location,
                                                        boolean transpose,
                                                        float[] value)
        Array version of: ProgramUniformMatrix4fvEXT
      • glProgramUniform1uivEXT

        public static void glProgramUniform1uivEXT​(int program,
                                                   int location,
                                                   int[] value)
        Array version of: ProgramUniform1uivEXT
      • glProgramUniform2uivEXT

        public static void glProgramUniform2uivEXT​(int program,
                                                   int location,
                                                   int[] value)
        Array version of: ProgramUniform2uivEXT
      • glProgramUniform3uivEXT

        public static void glProgramUniform3uivEXT​(int program,
                                                   int location,
                                                   int[] value)
        Array version of: ProgramUniform3uivEXT
      • glProgramUniform4uivEXT

        public static void glProgramUniform4uivEXT​(int program,
                                                   int location,
                                                   int[] value)
        Array version of: ProgramUniform4uivEXT
      • glProgramUniformMatrix2x3fvEXT

        public static void glProgramUniformMatrix2x3fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          float[] value)
      • glProgramUniformMatrix3x2fvEXT

        public static void glProgramUniformMatrix3x2fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          float[] value)
      • glProgramUniformMatrix2x4fvEXT

        public static void glProgramUniformMatrix2x4fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          float[] value)
      • glProgramUniformMatrix4x2fvEXT

        public static void glProgramUniformMatrix4x2fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          float[] value)
      • glProgramUniformMatrix3x4fvEXT

        public static void glProgramUniformMatrix3x4fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          float[] value)
      • glProgramUniformMatrix4x3fvEXT

        public static void glProgramUniformMatrix4x3fvEXT​(int program,
                                                          int location,
                                                          boolean transpose,
                                                          float[] value)