Re: glGenVertexArrays in Opengl ES 1.0 using android-ndk

372 views
Skip to first unread message

NoAngel

unread,
Jan 31, 2013, 12:47:10 AM1/31/13
to andro...@googlegroups.com
check your hardware for gl extensions support I guess.

2013年1月29日火曜日 8時22分53秒 UTC+9 Андрей Апанасик:
glGenVertexArrays = (PFNGLGENVERTEXARRAYSOESPROC) eglGetProcAddress("glGenVertexArraysOES");
    glBindVertexArray = (PFNGLBINDVERTEXARRAYOESPROC) eglGetProcAddress("glBindVertexArrayOES");
    glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSOESPROC) eglGetProcAddress("glDeleteVertexArraysOES");

    if (!glGenVertexArrays )
            LOGI ( "Can't get proc address: glGenVertexArraysOES" );

    if (glBindVertexArray){
            glBindVertexArray(0);
            LOGI("Vertex array exists");
        }
        else
            LOGI("Vertex array DON'T exists");

Work fine.

But don't work correctly this code =/
glGenVertexArrays(1, &verticesVAO);
    glBindVertexArray(verticesVAO);

What must i write to use Vertex?

NoAngel

unread,
Jan 31, 2013, 12:48:40 AM1/31/13
to andro...@googlegroups.com
if u see no gl extension in list it may be actully supported, but partially.

Андрей Апанасик

unread,
Oct 23, 2013, 4:06:29 PM10/23/13
to andro...@googlegroups.com
i see gl extension in list

четверг, 31 января 2013 г., 9:48:40 UTC+4 пользователь NoAngel написал:

NoAngel

unread,
Jul 14, 2016, 12:13:48 AM7/14/16
to android-ndk
better late than never :)
eglGetProcAddress() will return NULL for Your code.
You should use
void* libhandle=dlopen("libGLESv2.so",RTLD_LAZY);
glBindVertexArrayOES=(PFNGLBINDVERTEXARRAYOESPROC)dlsym(libhandle,"glBindVertexArrayOES");
//...

2013年10月24日木曜日 5時06分29秒 UTC+9 Andrey Apanasik:
Reply all
Reply to author
Forward
0 new messages