Access OpenGL ES extensions in Android 2.2 and early

One big issue with versions 2.2 and below of Android is that you cannot query extension’s methods from OpenGL ES.

But there’s a simple hack I tested in my LG Optimus 2x:

  1. in /system/lib/egl directory, there’s a library called libEGL_tegra.so. Open it with dlopen method in NDK:
    void* eglLibrary = dlopen(“libEGL_tegra.so”);
  2. query for method eglGetProcAddress with dlsym method. Hopefully, you’ll obtain a valid address:
    typedef void* (*PFNEGLGETPROCADDRESS)(const char* procName);
    PFNEGLGETPROCADDRESS getProcAddress = (PFNEGLGETPROCADDRESS) dlsym(eglLibrary, “eglGetProcAddress”);

  3. Now, query OGLES extension methods normally:
    typedef void (*PFNGLCOVERAGEMASKNV)(GLboolean mask); 
    PFNGLCOVERAGEMASKNV glCoverageMaskNV = (PFNGLCOVERAGEMASKNV) getProcAddress(“glCoverageMaskNV”);
  4. Don’t forget to close the library at the end of the program:
    dlclose(eglLibrary);

Other devices must be similar libraries in the same directory. I’ll post some updates about this.

Posted in OpenGL ES 2.0 | Tagged , , | Leave a comment

Irrlicht with DirectX 11

Hi for all.

Irrlicht, one of the most well known open-source game engines, now have a project to be integrated with DirectX 11. Follow the status in https://bitbucket.org/evandromillian/irrlicht-20xx.

Posted in Direct3D 11 | Tagged , , | Leave a comment