Skip to content
The Jenkins Controller is preparing for shutdown. No new builds can be started.
Unstable

Changes

Summary

  1. Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine (details)
  2. Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix (details)
  3. GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether (details)
Commit d46d9ad8f998a7128d9f023294d5f489673d6d8a by Sven Gothel
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Refine unit test for visual validation of 'no frame lag'

To validate whether a 'display' command w/o animator results to the desired frame
we introduce a 'userCounter' in TextRendererGLEL.

The latter gets increased and maybe visually validated by a key-press -> display.

Results: In all modes, MSAA or !MSAA, or flip - the result is valid.

Tested on windows and linux.
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00Base.java (diff)
Commit 41190c3830157abdf9649cbf7767e57108f55075 by Sven Gothel
Bug 975 - GLJPanel's OffscreenDrawable shall not double swap - Fix auto-swap mechanism ; Refined API doc getDefaultReadBuffer() ; Add GLDrawableUtil.swapBuffersBeforeRead(..)

Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 which introduces the default swap-buffers
mechanism is erroneous:

The OffscreenBack backend requires the following operation order:

Order-1:
  [1] - GL display
  [2] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable)
  [3] - readPixels

+++

Commit 82f679b064784213591b460fc5eaa1f5f196fbd1 however introduced:

Order-2:
  [a] - GL display
  [b] - readPixels
  [c] - GL swapBuffers (always due to single-buffer non-MSAA or MSAA offscreen drawable)

since [a] and [b] happened in Updater's display method, and [c] followed the same
triggered by GLAutoDrawableHelper.

+++

The proof, commit d46d9ad8f998a7128d9f023294d5f489673d6d8a, is faulty,
since it always included the 'snapshot' GL event listener
which turned-off auto-swap and swapped before read-pixels.
TL;DR it enforced proper Order-1.

+++

This fix allows the Backend to intercept disable GLDrawableHelper's setAutoSwapBufferMode(..)
and perform the auto-swap mode itself in the proper Order-1.

The unit test has been refined to optionally disable the snapshot
to validate auto-swap mode.

+++

Refined GLBase and GLContext's API doc for 'getDefaultReadBuffer()'

+++

Add GLDrawableUtil.swapBuffersBeforeRead(..)
and reuse it for TileRendererBase (original impl.).
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/util/UITestCase.java (diff)
The file was modifiedsrc/jogl/classes/javax/media/opengl/awt/GLJPanel.java (diff)
The file was modifiedsrc/jogl/classes/javax/media/opengl/GLContext.java (diff)
The file was modifiedsrc/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java (diff)
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLJPanelAWT.java (diff)
The file was modifiedsrc/jogl/classes/javax/media/opengl/GLBase.java (diff)
The file was modifiedsrc/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java (diff)
Commit b96fc594f15fcf9ee0fd238ce8d7a10aea781d32 by Sven Gothel
GLContextImpl/GLDrawableImpl.getDefaultReadBuffer(..): Pass hint whether dedicated read-drawable is being used (double buffering)
The file was modifiedsrc/jogl/classes/jogamp/opengl/GLContextImpl.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java (diff)
The file was modifiedsrc/jogl/classes/jogamp/opengl/GLDrawableImpl.java (diff)