Monthly Archives: October 2013

Vertex Array Object (VAO) on Android

Always wanted to put my hands on an OpenGL ES 3 Android device. Here are the results of testing VAO on Google Nexus 10 (Android 4.3 with OpenGL ES 3) and Samsung Galaxy Nexus (Android 4.3 with OpenGL ES 2 and OES_vertex_array_object extension).

1. First, the old Samsung Galaxy Nexus. 
The extensions list claims the OES_vertex_array_object extension is supported. So, I load the entry points:

#define BIND_EXT( VarName, Type, Bind1, Bind2 )\
        VarName = (Type)GetGLProc( API, Bind1 );\
        if ( !VarName ) VarName = (Type)GetGLProc( API, Bind2 );
BIND_EXT( API->glBindVertexArray,
          PFNGLBINDVERTEXARRAYPROC,
          "glBindVertexArray", "glBindVertexArrayOES" );
BIND_EXT( API->glDeleteVertexArrays,
          PFNGLDELETEVERTEXARRAYSPROC,
          "glDeleteVertexArrays", "glDeleteVertexArraysOES" );
BIND_EXT( API->glGenVertexArrays,
          PFNGLGENVERTEXARRAYSPROC,
          "glGenVertexArrays", "glGenVertexArraysOES" );

Just in case, I check for the presence of actual functions.

bool IsVAOSupported = API->glBindVertexArray &&
                      API->glDeleteVertexArrays &&
                      API->glGenVertexArrays;

It looks fine, so we start rendering using VAO in hope everything will go as expected. Nope, it doesn’t:

E/libEGL: called unimplemented OpenGL ES API.

Pfff, stop saying “Yes, we support VAO!”.

2. Here goes the Google Nexus 10 (with an awesome 2560×1600 10-inch touchscreen).

I/LEngine: OpenGL version   : OpenGL ES 3.0
I/LEngine: OpenGL vendor    : ARM
I/LEngine: OpenGL renderer  : Mali-T604
I/LEngine: GLSL version     : OpenGL ES GLSL ES 3.00

VAO just works using the same code path, which is used on a desktop OpenGL 3.2.