User avatar
RichardUK
Posts: 235
Joined: Fri Jun 01, 2012 5:12 pm

GL extensions

Sun Jun 24, 2012 8:02 am

Are the extensions listed in gl2ext.h all supported? I was always under the impression that for GLES the devices headers were specific to the chip. That is the hardware manufacture take the headers from Khronos and changed them for their hardware.

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: GL extensions

Sun Jun 24, 2012 8:52 am

I think it's a standard header with switches turned on for what is implemented. When I was looking for Vertex Array Objects I found this in the header

Code: Select all

/* GL_OES_vertex_array_object */
#ifndef GL_OES_vertex_array_object
#define GL_OES_vertex_array_object 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
#endif
typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
#endif
However GL_OES_vertex_array_object was undefined in the main platform header and if you try to define it linking fails If you run nm on the static lib you will see that they are not there.

I think the simplest way of seeing what is implemented is to use the following

Code: Select all

nm --demangle=gnu /opt/vc/lib/libGLESv2_static.a | c++filt 
On my build on the static lib has the symbols in as the dynamic seems to have been striped (latest wheezy beta)

Jon

User avatar
RichardUK
Posts: 235
Joined: Fri Jun 01, 2012 5:12 pm

Re: GL extensions

Sun Jun 24, 2012 9:04 am

Thanks Jon, I'll have a look at that. Must be something in the BC headers that enables the extensions they support.

dattrax
Posts: 52
Joined: Sat Dec 24, 2011 5:09 pm

Re: GL extensions

Sun Jun 24, 2012 11:29 pm

The extension headers are generic.

To find the supported extensions, you need to call glGetString() with GL_EXTENSIONS. You can then do a eglGetProcAddress().

VAO's are not supported.

Jim

adammw
Posts: 21
Joined: Fri Jun 15, 2012 4:28 am

Re: GL extensions

Mon Jun 25, 2012 1:54 am

Check http://elinux.org/RPi_VideoCore_APIs#OpenGL_ES or http://www.raspberrypi.org/phpBB3/viewt ... 318#p36318, they should list the extensions that are reported as supported by the pre-compiled libraries.

Return to “OpenGLES”