<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OpenGL syncrhonization on iMX6 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/OpenGL-syncrhonization-on-iMX6/m-p/659215#M101139</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;We have some questions regarding&amp;nbsp;OpenGL synchronization.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;eglSwapBuffers() is an asynchronous function.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0070c0;"&gt;You call it, and the function return immediately, without any guarantee that the operation are done (or even began).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;It would look like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 106.2pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;eglSwapBuffers();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 106.2pt;"&gt;&lt;STRONG style="color: #0070c0;"&gt;Wait until all operation are done&lt;/STRONG&gt;&lt;SPAN style="color: #0070c0;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 106.2pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Resume normal operation ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;At first we thought glfinish() would do the trick, but it doesn't seem to be the case.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;A bit of context:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;This is on WEC7, imX6 DL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;lib Vivante version is around 4.6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;DDRAW overlay are using double buffering.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;We would need a function waiting until flip() was called on the DDRAW overlays.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Does such a function exist ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;If not, is there any way to work around the problem ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;What is glfinish exact behavior ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2016 08:53:48 GMT</pubDate>
    <dc:creator>anthonypellerin</dc:creator>
    <dc:date>2016-09-28T08:53:48Z</dc:date>
    <item>
      <title>OpenGL syncrhonization on iMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenGL-syncrhonization-on-iMX6/m-p/659215#M101139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;We have some questions regarding&amp;nbsp;OpenGL synchronization.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;eglSwapBuffers() is an asynchronous function.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0070c0;"&gt;You call it, and the function return immediately, without any guarantee that the operation are done (or even began).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;It would look like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 106.2pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;eglSwapBuffers();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 106.2pt;"&gt;&lt;STRONG style="color: #0070c0;"&gt;Wait until all operation are done&lt;/STRONG&gt;&lt;SPAN style="color: #0070c0;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 106.2pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Resume normal operation ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;At first we thought glfinish() would do the trick, but it doesn't seem to be the case.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;A bit of context:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;This is on WEC7, imX6 DL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;lib Vivante version is around 4.6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;DDRAW overlay are using double buffering.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;We would need a function waiting until flip() was called on the DDRAW overlays.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Does such a function exist ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;If not, is there any way to work around the problem ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;What is glfinish exact behavior ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;/P&gt;&lt;P style="margin-left: 70.8pt;"&gt;&lt;SPAN style="color: #0070c0;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2016 08:53:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenGL-syncrhonization-on-iMX6/m-p/659215#M101139</guid>
      <dc:creator>anthonypellerin</dc:creator>
      <dc:date>2016-09-28T08:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL syncrhonization on iMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/OpenGL-syncrhonization-on-iMX6/m-p/659216#M101140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anthony,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.5pt; color: #242729; background: white;"&gt;glFlush ensures that previous OpenGL commands&amp;nbsp;must complete in infinite time,&lt;/SPAN&gt;&lt;EM style="border: none windowtext 1.0pt; padding: 0in;"&gt;&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="font-size: 12.5pt; color: #242729;"&gt;glFinish&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: none windowtext 1.0pt; padding: 0in;"&gt;does not return until all effects from previously issued commands are fully realized&lt;/SPAN&gt;. 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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 12.5pt; color: #242729;"&gt;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,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.opengl.org/wiki/Common_Mistakes#glFinish_and_glFlush"&gt;&lt;SPAN style="color: #242729; text-decoration: none;"&gt;there is no need to call glFlush firts&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 16:07:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/OpenGL-syncrhonization-on-iMX6/m-p/659216#M101140</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2016-10-04T16:07:57Z</dc:date>
    </item>
  </channel>
</rss>

