<p>I have encountered devices that advertise certain extensions via glGetString(GL_EXTENSIONS) and do not expose the entry points. I have also encountered the opposite, the extension was not in the extension strings but the entry points were there and it worked. It depends on whether the vendor has disabled any features in the driver from the GPU provider.</p>

<p>You will need to check both the extension strings and check if the entry point is not NULL via <a href="https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetProcAddress.xhtml" rel="nofollow">eglGetProcAddress</a>.</p>

<p>Apart from that, each extension should conform to the <a href="https://www.khronos.org/registry/gles/#headers2" rel="nofollow">Khronos registry of extensions</a> so you can include gl2ext.h directly from there if you wanted.</p>

CC BY-SA 3.0
2015-08-10T13:15:04.140Z
2015-08-10T13:15:04.140Z
ashleysmithgpu
<p>It is no secret that according to the <a href="http://developer.android.com/reference/android/opengl/package-summary.html">official documentation</a> extensions are not available under OpenGL ES 2.0. Nevertheless, the <em>glext.h</em> file present in the NDK platform-include directories makes me think that extensions are indeed available. I know that working with OpenGL under NDK doesn't differ from working with standalone OpenGL. So, if I make something like a JNI bridge between my java engine interface and these extensions, I could use them.</p>

<p>So the question is: what architectural solution should I use if I want to use available OpenGL ES extensions on ES2.0 devices?</p>

CC BY-SA 3.0
2015-08-10T18:37:46.093Z
Just noting that I've definitely used extensions via GLES 2.0 on android (and in native code) so you shouldn't have any issues on that part of your solution.
Robert Cannell
CC BY-SA 3.0
2015-08-11T00:46:25.163Z
Are we considering very specific programming questions like these? This is a very API-specific programming question and doesn't even involve anything related to rendering techniques or usage of an API to implement them.
yuriks
CC BY-SA 3.0
2015-08-11T08:30:34.893Z
@yuriks Yes, I think we should definitely except if they are very specific programming questions related to computer graphics. In fact, I think that specific programming questions are what we are lacking the most so far (probably because these are harder to come up with if you don't encounter them right then and there).
Martin Ender
<opengl><android>
Using extensions in Android OpenGL ES 2.0
Netherwire
# Using extensions in Android OpenGL ES 2.0

(Asked by: username_0 on 2015-08-10)

It is no secret that according to the [official documentation](http://developer.android.com/reference/android/opengl/package-summary.html) extensions are not available under OpenGL ES 2.0. Nevertheless, the *glext.h* file present in the NDK platform-include directories makes me think that extensions are indeed available. I know that working with OpenGL under NDK doesn't differ from working with standalone OpenGL. So, if I make something like a JNI bridge between my java engine interface and these extensions, I could use them.

So the question is: what architectural solution should I use if I want to use available OpenGL ES extensions on ES2.0 devices?

**Tags:** opengl, android

> **Comments:**
> **username_1**: Just noting that I've definitely used extensions via GLES 2.0 on android (and in native code) so you shouldn't have any issues on that part of your solution.  
> **username_2**: Are we considering very specific programming questions like these? This is a very API-specific programming question and doesn't even involve anything related to rendering techniques or usage of an API to implement them.  
> **username_3**: @username_2 Yes, I think we should definitely except if they are very specific programming questions related to computer graphics. In fact, I think that specific programming questions are what we are lacking the most so far (probably because these are harder to come up with if you don't encounter them right then and there).  

---

## 1 answers

### Answer by username_4 on 2015-08-10. Score: 5 | Accepted answer

I have encountered devices that advertise certain extensions via glGetString(GL\_EXTENSIONS) and do not expose the entry points. I have also encountered the opposite, the extension was not in the extension strings but the entry points were there and it worked. It depends on whether the vendor has disabled any features in the driver from the GPU provider.

You will need to check both the extension strings and check if the entry point is not NULL via [eglGetProcAddress](https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetProcAddress.xhtml).

Apart from that, each extension should conform to the [Khronos registry of extensions](https://www.khronos.org/registry/gles/#headers2) so you can include gl2ext.h directly from there if you wanted.


---

