OpenGL syncrhonization on iMX6

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

OpenGL syncrhonization on iMX6

ソリューションへジャンプ
1,117件の閲覧回数
anthonypellerin
Contributor I

Hi,

We have some questions regarding OpenGL synchronization.

 

eglSwapBuffers() is an asynchronous function. You call it, and the function return immediately, without any guarantee that the operation are done (or even began).

 

For a specific use case, we need to wait until all operation are done and the result is visible on screen, before doing anything else.

It would look like:

eglSwapBuffers();

Wait until all operation are done;

Resume normal operation ...

At first we thought glfinish() would do the trick, but it doesn't seem to be the case.

 

A bit of context:

This is on WEC7, imX6 DL.

lib Vivante version is around 4.6.

DDRAW overlay are using double buffering.

 

We would need a function waiting until flip() was called on the DDRAW overlays.

Does such a function exist ?

If not, is there any way to work around the problem ?

What is glfinish exact behavior ?

Thanks

ラベル(2)
0 件の賞賛
返信
1 解決策
893件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Anthony,

glFlush ensures that previous OpenGL commands must complete in infinite time, glFinish does not return until all effects from previously issued commands are fully realized. This means that the execution of your program waits here until every last pixel is drawn and OpenGL has nothing more to do. If you render directly to the front buffer, glFinish is the call to make before using the operating system calls to take screenshots. It is far less useful for double buffering, because you don't see the changes you forced to complete.

So if you use double buffering, you probably won't need neither glFlush nor glFinish. SwapBuffers implicitly directs the OpenGL calls to the correct buffer, there is no need to call glFlush firts

Hope it helps

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
894件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Anthony,

glFlush ensures that previous OpenGL commands must complete in infinite time, glFinish does not return until all effects from previously issued commands are fully realized. This means that the execution of your program waits here until every last pixel is drawn and OpenGL has nothing more to do. If you render directly to the front buffer, glFinish is the call to make before using the operating system calls to take screenshots. It is far less useful for double buffering, because you don't see the changes you forced to complete.

So if you use double buffering, you probably won't need neither glFlush nor glFinish. SwapBuffers implicitly directs the OpenGL calls to the correct buffer, there is no need to call glFlush firts

Hope it helps

0 件の賞賛
返信