我想在我的 Android 原生 c 应用程序中使用 VAO。
问题是,这GL_OES_vertex_array_object
是支持的,我什至可以得到地址,glBindVertexArrayOES
但glDeleteVertexArraysOES
找不到glGenVertexArraysOES
。
的存在是否GL_OES_vertex_array_object
意味着所有这些功能都可以访问?
我的 VAO 初始化代码:
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" );
}
我当然收到日志消息
无法获取 proc 地址:glGenVertexArraysOES
我的Android.mk
(缩短一点):
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)
设备型号 Samsung i9003 与 Android 2.3.5