我想在Android的native-c應用程序中使用VAO。android-ndk,glGenVertexArraysOES找不到
問題是,支持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");
}
當然我得到的日誌消息
Can't get proc address: 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)
設備型號爲三星i9003 with Android 2.3.5
你想達到什麼目的?請複製一些代碼片段。你的makefile是什麼樣的?你依靠什麼庫? –
請重讀,我更新了這個問題。 –
你的設備是「真實」的嗎?我希望你不要使用模擬三星i9003的android模擬器,對嗎?我發現[本文](http://www.cocos2d-x.org/issues/1229),您可能會對此感興趣。「小心:Android模擬器目前不支持OpenGL ES 2.0。您必須擁有物理運行Android 2.2(API Level 8)或更高版本的測試設備,以運行和測試本教程中的示例代碼。「 –