Reprinted please indicate the source is klayge Game Engine
As a sub-project of klayge, glloader is an OpenGL extended loading warehouse that can load OpenGL 1.0-4.2, OpenGL ES 1.0-2.0, and OpenGL extensions such as WGL and Glx. You only need to write XML scripts to automatically generate extended loads.Code.
With the help of Wang Rui, glloader has completed the porting to Android. Currently, glloader can be compiled using ndk R6 and R7, and both the simulator and the real machine xoom have passed the test. Currently, glloader code supporting android can be found on Hg. The official version of glloader 4.0 will be released later.
Here is an example of using glloader in Android ndk, which is modified from native-activity in ndk. From this, we can see that from the original direct call of gles to use glloader, You need to modify the # include and link options.
Native-activity.7z
Note that due to a bug in ndk R6, the shared library used for glloader must be written in C ++ and cannot be C, otherwise, a connection error occurs because the stdc ++ runtime cannot be connected.