CCRenderTexture::renderTextureWithWidthAndHeight always failed.

Hello!

I used CCRenderTexture for taking a snapshot,but CCRenderTexture::renderTextureWithWidthAndHeight always show assert dialog.
I found that ccglCheckFramebufferStatus returns 0x00003000, and don’t know what this error means.
RenderTexture test In TestCocos2dx project also failed in the same way, and I cannot find any information about this problem.
This problem occured on SDK 2.0.4 simulator.

Is there anybody facing the same problem?
Thanks.

Hi, maybe it’s the problem of emulator. Could you test it on device?

Sorry for late :slight_smile:
I got a device yesterday and checked out that CCRenderTexture did well on device.
Thanks!

Recently I have found that eglGetProcAddress returns null if CCEGL is not initialized.
Once it is initialized this method returns properly, so I think you can make this situation by rebooting your device. I resolve this error by moving eglGetProcAddress after CCEGL::Create.

I will consider to move eglGetProcAddress after CCEGL::Create.
However, I wanna know which device you are using, Wave 3(S8600) or Wave M ?

My device is Wave 2(M210S).

Sorry if I dig up this old thread, but I experience the same problem.
Everytime I try to create a CCRenderTexture I get a assert box on the emulator and a crash on the actual device.
I tried widths and heights that are the power of two, but that did not help at all.
SDK version is 2.0.5.

Thanks in advance

//EDIT: updated to latest cocos2d version and it actually works on the device!