2013-04-11 44 views
3

我已经下载了cocos2d-x中的projet源代码。没有使用./build_native.sh和android-ndk-r8编译cocos2d-x

我正在使用来自./build_native.sh Hello World示例,这确实可行。

再一次编译时我收到此错误:

Gdbserver  : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver 
Gdbsetup  : libs/armeabi/gdb.setup 
Compile++ thumb : cocos2d <= CCGrabber.cpp 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In constructor 'cocos2d::CCGrabber::CCGrabber()': 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:46:32: error: 'glGenFramebuffersOES' was not declared in this scope 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::grab(cocos2d::CCTexture2D*)': 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:61:47: error: 'glBindFramebufferOES' was not declared in this scope 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:65:26: error: 'glFramebufferTexture2DOES' was not declared in this scope 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:68:63: error: 'glCheckFramebufferStatusOES' was not declared in this scope 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::beforeRender(cocos2d::CCTexture2D*)': 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:88:47: error: 'glBindFramebufferOES' was not declared in this scope 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::afterRender(cocos2d::CCTexture2D*)': 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:113:50: error: 'glBindFramebufferOES' was not declared in this scope 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In destructor 'virtual cocos2d::CCGrabber::~CCGrabber()': 
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:127:35: error: 'glDeleteFramebuffersOES' was not declared in this scope 

我搜查,发现this sollution。但它不适合我。我仍然收到同样的错误。也许它在ndk-r8中不同,而溶剂是ndk-r7。

任何帮助?

回答

0

你的Android SDK版本必须比从2.2 2.2.because越大,机器人开始支持OpenGL ES 2.0的,和的cocos2d-X 2.0使用opengles 2.0渲染

+0

大于等于或仅更大?因为我使用2.2(api 8)。不过,我会再检查一次。谢谢。 – ghostrider 2013-04-26 14:15:40