i’m trying to use the VertexArray with Android NDK for a project that already compiles ok and uses other Open GL ES calls ok.
For the purposes of this question let’s talk about the call ‘glGenVertexArrays’ alone.
I found the following definition in gl2ext.h:
GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
it is defined behind GL_GLEXT_PROTOTYPES definition. So I defined it and used it. It compiles fine but i’m getting link errors: undefined reference, so it seems it is missing from the lib file…
So, then I tried using the typedef below in gl2ext.h:
typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
like this:
PFNGLGENVERTEXARRAYSOESPROC glGenVertexArrays;
glGenVertexArrays = (PFNGLGENVERTEXARRAYSOESPROC) eglGetProcAddress("glGenVertexArraysOES");
and … nothing, returns NULL.
I also tries “glGenVertexArrays” … nothing, still returns NULL
any ideas would be appreciated. Thank you.
You are trying OpenGL ES Extensions which may or may not be supported.
http://www.khronos.org/opengles/documentation/opengles1_0/html/glIntro.html
Just because it is in the standard header doesn’t mean that Android or any particular implementation actually has that API.