Open Trurl101 opened 12 years ago
I'm having the same error on my Galaxy Nexus device... Any workaround?
This error appears on real devices too? Which Nexus do you use and which android version? I thought this is only appears on old devices and emulator.
I hope some guy with open-gl knowledge could help
Hi, exactly. In some cases happens on my Galaxy Nexus devices, with stock Android 4.0.2
I recognize that you should only build a CCRendertexture in "onenter" or something like that otherwise the app crashes (I think because the openg-gl-scene is not fully initalized before?)
GlGenRenderbuffersOES is in android since API 4 should be no problem. I tested it on Samsung Galaxy S and Galaxy Note and it works fine. I experience only problems in the emulator.
You are completely right. Creating the CCRendertexture inside onEnter method works well. Thanks!
If I use CCRendertexture I can not test the apps in the android-emulator. The following error appears (i replaced my app-name with XXX):
03-23 10:30:26.118: E/AndroidRuntime(896): FATAL EXCEPTION: GLThread 105 03-23 10:30:26.118: E/AndroidRuntime(896): java.lang.UnsupportedOperationException: glGenRenderbuffersOES 03-23 10:30:26.118: E/AndroidRuntime(896): at com.google.android.gles_jni.GLImpl.glGenRenderbuffersOES(Native Method) 03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.opengl.CCRenderTexture.(CCRenderTexture.java:69)
03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.opengl.CCRenderTexture.renderTexture(CCRenderTexture.java:43)
03-23 10:30:26.118: E/AndroidRuntime(896): at XXX.loadSprites(SplashScene.java:43)
03-23 10:30:26.118: E/AndroidRuntime(896): at XXX.SplashScene.onEnter(SplashScene.java:37)
03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.nodes.CCDirector.setNextScene(CCDirector.java:1238)
03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.nodes.CCDirector.drawCCScene(CCDirector.java:705)
03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.nodes.CCDirector.onDrawFrame(CCDirector.java:665)
03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1245)
03-23 10:30:26.118: E/AndroidRuntime(896): at org.cocos2d.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1056)
I think it is a bug in the emulator, but is it possible to use an other openGL-Function to replace glGenRenderbuffersOES?