diff options
author | Sven Gothel <[email protected]> | 2013-03-26 12:42:04 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-03-26 12:42:04 +0100 |
commit | d90855bfc457a703d7a8fe14598f4d5e8de7e73e (patch) | |
tree | 70f4f333d68914ba50a3303805a386c399b5d201 /src | |
parent | 21cde04129ea241744b95cad8fd0a545d3474b05 (diff) |
GLJPanel: Refine API doc
Diffstat (limited to 'src')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index ed0fadfa9..f1a2ccc7e 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -109,16 +109,23 @@ import com.jogamp.opengl.util.GLPixelStorageModes; using {@link GLDrawableFactory#createOffscreenDrawable(AbstractGraphicsDevice, GLCapabilitiesImmutable, GLCapabilitiesChooser, int, int) GLDrawableFactory.createOffscreenDrawable(..)}.<br/> </P> <P> - The OpenGL rendered pixels are copied to an {@link BufferedImage} via {@link GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer) glReadPixels(..)} - which is drawn to the Swing <i>space</i> via {@link Graphics#drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver) Graphics.drawImage(...)}. - </p> - <P> - If FBO is being used and GLSL is available, a fragment shader is utilized - to flip the OpenGL pixels vertically before <code>glReadPixels(..)</code>, - if not disabled via system property <code>jogl.gljpanel.noglsl</code>.<br/> - Otherwise {@link System#arraycopy(Object, int, Object, int, int) System.arraycopy(..)} is used line by line, causing more CPU load per frame. + In case FBO is used and GLSL is available, a fragment shader is utilized + to flip the FBO texture vertically. This hardware-accelerated step can be disabled via system property <code>jogl.gljpanel.noglsl</code>. </P> <P> + The OpenGL path is concluded by copying the rendered pixels an {@link BufferedImage} via {@link GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer) glReadPixels(..)} + for later Java2D composition. + </p> + <p> + In case the above mentioned GLSL vertical-flipping is not performed, + {@link System#arraycopy(Object, int, Object, int, int) System.arraycopy(..)} is used line by line. + This step causes more CPU load per frame and is not hardware-accelerated. + </p> + <p> + Finally the Java2D compositioning takes place via via {@link Graphics#drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver) Graphics.drawImage(...)} + on the prepared {@link BufferedImage} as described above. + </p> + <P> * Please read <A HREF="GLCanvas.html#java2dgl">Java2D OpenGL Remarks</A>. * </P> */ |