语言

Menu
Sites
Language
Screen not updated with OpenGL

Hi,

I'm still having issues with OpenGL :
I can't find a way to update the screen after updating the eglContext. Before going further in my explanation, here is how I proceed :

I have a frame containing an EGL Context, which is initialised when the frame's created (almost the same params as in the cube example).
I then start an infinite loop (containing the game), and at a fixed rate, calling the method updating the context (which for now do a makeContext, update the clearColor of the screen, clean the color buffer and swap the buffer).

When I use a Timer to ask for the redraw instead of my infinite loop, it's working, but the Timer architecture does not match the architecture of the game I'm currently porting...
It seems that the method updating the screen is not called due to the infinite loop, so here is my question :

Is there a way to force the screen to update ? or to wait the screen update before continuing ?
I already tried the eglWait* methods, but I'm not sure I did it well...

Thanks

Benjamin

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

3 回复
Benjamin Blois
In fact, It seems that all the internal callback are not called when you are into a loop inside your mainthread... Is there a way to do it manually, or to stop the execution to allow them to be called ?
john Smith
Hi, There is sample App available in Tizen SDK, go through that. Glescube, Glescube11, GlesShader. You might be able to get.
Benjamin Blois
Hi, Actually, the samples are build on the Timer system, using callbacks to update the context. This architecture is not good for me : the game I'm porting is relying on an infinite loop and a system for asking a frame update and waiting for it to be done. The only thing I don't know how to do, is how to wait allowing the screen to update ? Normally, I would have used Threads, but there are issues with threads and OpenGl (of at least with GLPlayer/Renderer), so I'm a bit stuck... Any idea ?