Class OESGetProgramBinary
- java.lang.Object
-
- org.lwjgl.opengles.OESGetProgramBinary
-
public class OESGetProgramBinary extends java.lang.Object
Native bindings to the OES_get_program_binary extension.This extension introduces two new commands. GetProgramBinaryOES empowers an application to use the GL itself as an offline compiler. The resulting program binary can be reloaded into the GL via ProgramBinaryOES. This is a very useful path for applications that wish to remain portable by shipping pure GLSL source shaders, yet would like to avoid the cost of compiling their shaders at runtime. Instead an application can supply its GLSL source shaders during first application run, or even during installation. The application then compiles and links its shaders and reads back the program binaries. On subsequent runs, only the program binaries need be supplied! Though the level of optimization may not be identical -- the offline shader compiler may have the luxury of more aggressive optimization at its disposal -- program binaries generated online by the GL are interchangeable with those generated offline by an SDK tool.
Note that an implementation supporting this extension need not include an online compiler. That is, it is not required to support loading GLSL shader sources via the ShaderSource command. A query of boolean value SHADER_COMPILER can be used to determine if an implementation supports a shader compiler. If not, the GetProgramBinaryOES command is rendered virtually useless, but the ProgramBinaryOES command may still be used by vendor extensions as a standard method for loading offline-compiled program binaries.
Requires
GLES 2.0
.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
GL_NUM_PROGRAM_BINARY_FORMATS_OES
GL_PROGRAM_BINARY_FORMATS_OESAccepted by thepname
parameter of GetBooleanv, GetIntegerv, and GetFloatv.static int
GL_PROGRAM_BINARY_LENGTH_OES
ccepted by thepname
parameter of GetProgramiv.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static void
glGetProgramBinaryOES(int program, int[] length, int[] binaryFormat, java.nio.ByteBuffer binary)
Array version of:GetProgramBinaryOES
static void
glGetProgramBinaryOES(int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, java.nio.ByteBuffer binary)
static void
glProgramBinaryOES(int program, int binaryFormat, java.nio.ByteBuffer binary)
-
-
-
Field Detail
-
GL_PROGRAM_BINARY_LENGTH_OES
public static final int GL_PROGRAM_BINARY_LENGTH_OES
ccepted by thepname
parameter of GetProgramiv.- See Also:
- Constant Field Values
-
GL_NUM_PROGRAM_BINARY_FORMATS_OES
public static final int GL_NUM_PROGRAM_BINARY_FORMATS_OES
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, and GetFloatv.- See Also:
- Constant Field Values
-
GL_PROGRAM_BINARY_FORMATS_OES
public static final int GL_PROGRAM_BINARY_FORMATS_OES
Accepted by thepname
parameter of GetBooleanv, GetIntegerv, and GetFloatv.- See Also:
- Constant Field Values
-
-
Method Detail
-
glGetProgramBinaryOES
public static void glGetProgramBinaryOES(int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, java.nio.ByteBuffer binary)
-
glProgramBinaryOES
public static void glProgramBinaryOES(int program, int binaryFormat, java.nio.ByteBuffer binary)
-
glGetProgramBinaryOES
public static void glGetProgramBinaryOES(int program, int[] length, int[] binaryFormat, java.nio.ByteBuffer binary)
Array version of:GetProgramBinaryOES
-
-