EXT_occlusion_query_boolean on Android

I added support for EXT_occlusion_query_boolean on iPhone:

But can’t find it in the ndk version 9 gl2ext header. Is there anything else I have to do to make this run on supported Android devices, or should I just forget it?

I think you can just add the necessary function pointers to your code even if the NDK headers does not directly supports it. I’m not familiar with GLES extension loading, though I suppose it should be pretty same to how it is done in WGL/GLX.

It is another question whether any Android devices support EXT_occlusion_query_boolean so I would definitely choose to have also a fall-back path.

That’s not a problem, the code is already set up to not use occlusion if the extension isn’t supported.

I tried replacing gl2ext.h in the NDK with the one found here:

I recompiled my project in Eclipse, but the extension functions still aren’t recognized (it won’t even compile). Is there anything else I have to do?

I think I found the answer. You have to use Android 2.3 or greater to get extra extensions: