Daniel Ryan
Daniel Ryan

Reputation: 7100

Using GL_OES_get_program_binary(compiled shaders) on Android

I'm looking to use GL_OES_get_program on Android using the Android SDK (not native).

http://www.khronos.org/registry/gles/extensions/OES/OES_get_program_binary.txt

The Android SDK allows to upload shaders in binary format, but how can I get the binary from the driver in Java?

Upvotes: 1

Views: 1063

Answers (1)

datenwolf
datenwolf

Reputation: 162297

The idea of retrieving the program binary is, that after supplying the OpenGL(-ES) implementation with the shader source code, you receive back the compiled binary to cache it. If the driver or the OS version changes, it might be necessary to recompile the sources. So the shader binary program interface is not meant for shipping a shader binary only.

You retrieve the shader binary by calling glGetProgramBinaryOES. Franky, I don't really understand your problem, because the specifcation text you linked has example code at the end.

Upvotes: 1

Related Questions