I want to compile shader source first, then load the binary in OpenGL ES code. Both linux and windows versions are prefered. But I can't find the compiler.Could you help me?
The examples in Vivante's SDK are largely copied from the PowerVR SDK examples (and the old NeHe examples). You should not infer too much about what is supported from them. One of the reasons they don't release the GLSL compiler separate from the drivers is because the actual microcode that the compiler produces can be different across different releases of the Vivante cores and even i.MX6 chip releases. In other words, the binary microcode is not portable across older and newer versions of the i.MX6 series. The situation is the same with the TI OMAP series and their PowerVR cores and probably with Nvidia as well.
Hello Gary Yin,
Please look at the GPU demo framework SDK (link below, please note that you may need to login in order to download this file) which includes also documentation on how to compile OpenGL ES code (and it also comes with some examples).
i.MX6D/Q/DL/S/SX GPU Demo Framework SDK
There is GLESx example which uses pre-compiled binary, but I can't find the compiler inside.
My apologies. The compiler comes as a binary as its intellectual property of the GPU designer so source code for it cannot be provided.
The pre-compiled compiler is OK, I do not need the source code. The problem is I can't find the pre-compiled version neither.
The "binary" I mentioned in previous post is the binary-shader, generated from the shader source code. Don't be confused.
Hello Gary Tin,
I apologize for the confusion. Al libraries required to compile OpenGL ES code are included in the SDK bundle. You would need to use them to setup the makefile configuration and then compile your OpenGL ES code using the BSP Toolchain (please use the i.MX6 BSP toolchain are other toolchains like Linaro may not work correctly with the libraries.
So, NXP can't provide the shader language compile. User can only use the runtime compiling mode. If so, I won't spand time on this issue.
The GLSL shader compiler for OpenGL ES 2.0 and 3.0 is built into the GLES2 and GLES3 device drivers. This is required because shader programs are compiled at run-time, on the embedded device. So what you are really asking for is the source code to Vivante's OpenGL drivers, which they do not release.
But what's the purpose of the example which shows loading pre-compiled binary shader?
The example introduces "glProgramBinaryOES()" function.
Retrieving data ...