Graphics Reference
In-Depth Information
Program Binaries
Program binaries are the binary representation of a complete compiled
and linked program. They are useful because they can be saved to the file
system to be reused later, thereby avoiding the cost of online compilation.
You may also use program binaries so that you do not have to distribute
the shader source codes in your implementation.
You can retrieve the program binary using glGetProgramBinary after you
have compiled and linked the program successfully.
void glGetProgramBinary (GLuint program, GLsizei bufSize,
GLsizei * length , GLenum binaryFormat,
GLvoid * binary )
program handle to the program object
bufSize the maximum number of bytes that may be written
into the binary
length the number of bytes in the binary data
binaryFormat the vendor-specific binary format token
binary
pointer to the binary data generated by the shader
compiler
After you have retrieved the program binary, you can save it to the file
system or load the program binary back into the implementation using
glProgramBinary .
void glProgramBinary (GLuint program, GLenum binaryFormat,
const GLvoid * binary, GLsizei length )
program handle to the program object
binaryFormat the vendor-specific binary format token
binary
pointer to the binary data generated by the shader
compiler
the number of bytes in the binary data
length
 
 
 
Search WWH ::




Custom Search