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

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.

标签 (1)
无评分
版本历史
最后更新:
‎07-09-2014 12:30 AM
更新人: