I want to use VAO in my native-c application for Android.
The problem is, that GL_OES_vertex_array_object
is supported and I can even get the addresses of glBindVertexArrayOES
and glDeleteVertexArraysOES
but glGenVertexArraysOES
is not found.
Does the presence of GL_OES_vertex_array_object
mean that all these functions can be accessed?
My code for VAO initialization:
std::string vao = "GL_OES_vertex_array_object";
if ( isExtensionSupported ( vao.c_str () ) != 0 )
{
LOG ( vao << " supported" );
glBindVertexArrayOES = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress ( "glBindVertexArrayOES" );
if ( !glBindVertexArrayOES )
LOG ( "Can't get proc address: glBindVertexArrayOES" );
glDeleteVertexArraysOES = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress ( "glDeleteVertexArraysOES" );
if ( !glDeleteVertexArraysOES )
LOG ( "Can't get proc address: glDeleteVertexArraysOES" );
glGenVertexArraysOES = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress ( "glGenVertexArraysOES" );
if ( glGenVertexArraysOES )
LOG ( "Can't get proc address: glGenVertexArraysOES" );
}
else
{
LOG ( vao << " not supported" );
}
Of course I get the log message
Can't get proc address: glGenVertexArraysOES
My Android.mk
(shortened a little bit):
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := smart
LOCAL_SRC_FILES := Base/Node.cpp
...
LOCAL_LDLIBS := -llog -landroid -lGLESv2 -lEGL
LOCAL_STATIC_LIBRARIES := nv_and_util
include $(BUILD_SHARED_LIBRARY)
$(call import-add-path, C:/NVPACK/TDK_Samples/tegra_android_native_samples_v10p00/libs/jni)
$(call import-module,nv_and_util)
Device model Samsung i9003 with Android 2.3.5