Projects > cpp > Issues > Bug #507

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

RenderTextureTest failed in some android devices

Bug #507 [Closed]
walzer@cocos2d-x.org 2011-05-22 23:31 . Updated about 2 years ago

It runs well on xoom, while failed in huawei u8800.
A developer reported that it runs well on HTC G7, and filaed in G8.
It seems not correctly on wophone.

Maybe we have to trace the opengles calls

walzer@cocos2d-x.org 2011-05-22 23:32
  • Assignee set to huangrh
StrawberryMilkshake 2011-05-23 01:34

The Tests demo fails (@ the render to texture test) on my HTC Desire as well, but I did get it to work in my own app, without the issues.

How? I don’t know, it just worked :p But the demo shows random garbage.

StrawberryMilkshake 2011-05-25 23:51

I’ve been thinking a lot about it (because my game needs them to make things fast) and I think it’s best to “support” CCRenderTexture on devices without support for FBO in the following ways:

  • By preventing crashes or the dreaded “unimplemented opengl es api” message (or both :P ) by doing an internal check for GL_OES_framebuffer_object (see the following item for more about that).

  • By adding some kind of “isSupported” method @ CCRenderTexture. This is ugly, but at least it gives the developer the option to check for it and implement a way to fall back to another code path. I’m currently doing this in my game by checking the GL_EXTENSIONS string for GL_OES_framebuffer_object. If the extension is not there, it’s not supported. This is the only way to check for valid FBO support. Checking for GL1.1 or even GL 2.0 won’t necessarily mean that FBO is actually supported.

StrawberryMilkshake 2011-05-25 23:59

In addition to that, you could circumvent the missing FBO support by using glReadPixels, but I’m not sure if that’s the way to go because it will always be slow. The GLES driver will have to flush the pipeline to get the pixel data.

huangrh 2011-06-01 20:34

RenderTextureTest will crash on some machenes that use opengl es 1.0, because there are some extention functions not supported in version 1.0.
So, we will give a hint and ignore these tests acording to the gles version.

The garbled showing effect of RenderTextureTest on G7 is another problem, still being traced, please refer to http://www.cocos2d-x.org/issues/511.

Thanks for Strawberry Milkshake’s advice!

walzer@cocos2d-x.org 2011-06-15 01:37
  • Target version changed from cocos2d-1.0.0-x-0.9.0 to cocos2d-0.99.5-x-0.8.5
zhangxm 2011-06-15 02:33
  • Status changed from New to Resolved
walzer@cocos2d-x.org 2011-06-23 01:05
  • Status changed from Resolved to Closed
walzer@cocos2d-x.org 2012-05-25 08:12
  • Project changed from cocos2d-x to cpp
  • Category deleted (5)
  • Target version deleted (cocos2d-0.99.5-x-0.8.5)
ionliga 2014-11-28 14:35

The optimization introduces a bug where the priority and Touch Mode will not get changed if the list is locked.
The most straight forward fix is to merge the pHandlersToAdd and pHandlersToRemove into a queue and process through all of them in the order they are received

Pokerstar88.com Agen Texas Poker dan Domino Online Indonesia Terpercaya | Agen Bola | Taruhan Bola | Agen Bola | Olb365.com Agen Judi Bola Online, Agen Judi Casino Online Indonesia Terpercaya

Atom PDF

Status:Closed
Start date:2011-05-22
Priority:Normal
Due date:
Assignee:huangrh
% Done:

0%

Category:-
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.