How to use OpenGL ES 2.0 “GL_OES_vertex_array_object” extension

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use OpenGL ES 2.0 “GL_OES_vertex_array_object” extension

How to use OpenGL ES 2.0 “GL_OES_vertex_array_object” extension

If someone wants to use the OpenGL ES 2.0 extension "GL_OES_vertex_array_object", the macro "GL_GLEXT_PROTOTYPES" must be defined in his program first. Then he can get the extension program location by calling the API eglGetProcAddress.  Here is an example to use this extension.

#define GL_GLEXT_PROTOTYPES

PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESv;

PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESv;

PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESv;

glGenVertexArraysOESv = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress ( "glGenVertexArraysOES" );

glBindVertexArrayOESv = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress ( "glBindVertexArrayOES" );

glDeleteVertexArraysOESv = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress ( "glDeleteVertexArraysOES" );

After these steps, the new alias glGenVertexArraysOESv, glBindVertexArrayOESv, glDeleteVertexArraysOESv can be use to call the VAO operation function in OpenGL ES 2.0 extensions.

Labels (1)
No ratings
Version history
Last update:
‎07-09-2014 12:30 AM
Updated by: