Open GL display may not be created on some devices. engine_draw_frame : No display.

Hi guys.
I have problems with new NativeActivity initialization. There are some devices that can’t init Open GL. When the app starts nothing is displayed. The only thing i can see in log is:

W/cocos2dx/nativeactivity.cpp(13697): engine_draw_frame : No display.

I have 6 devices and only LG Nexus 4 and Samsung Galaxy S4 work properly. It seems that only chinese devices have this problem. Devices that are not working:

  1. Jiayu g3
  2. Ainol Novo9 Spark
  3. Onda v972
  4. NEO X5mini

I tried to tweak Open GL initialization, but with no luck yet. Can somebody help with this?

Danil Valmar wrote:

Hi guys.
I have problems with new NativeActivity initialization. There are some devices that can’t init Open GL. When the app starts nothing is displayed. The only thing i can see in log is:
>
W/cocos2dx/nativeactivity.cpp(13697): engine_draw_frame : No display.
>
I have 6 devices and only LG Nexus 4 and Samsung Galaxy S4 work properly. It seems that only chinese devices have this problem. Devices that are not working:

  1. Jiayu g3
  2. Ainol Novo9 Spark
  3. Onda v972
  4. NEO X5mini
    >
    I tried to tweak Open GL initialization, but with no luck yet. Can somebody help with this?

I also encountered this problem.
show:
W/cocos2dx/nativeactivity.cpp(7186)engine_draw_frame : No display.
devices is Samsung i9000(Samsung S)

environment:
cocos2dx 3.0 alpha0

I’m getting the same with a Kindle Fire HD

Any news on this?

Nope. I’ not an expert in OpenGL so all I tried didn’t work. Somebody from main developers should check it.

I’ve worked on this issue for a while and, at least for me, this little change seems to work just fine:

Can you try this too?

I can confirm that the above fixes the issue for a Kindle Fire HD. Thanks! You saved me quite a few hours of debugging!

Thank you!

FYI: I’ve created a pull request for this change: https://github.com/cocos2d/cocos2d-x/pull/3769

It also resolve the problem on Samsung i9000(Samsung S).
VERY THANKS!

Looks like pretty easy fix. I can’t test it, because i don’t have devices anymore. Hope it fixes it. Thanks