From c223c64a195fb543167d66b7e9ce3661eb48d772 Mon Sep 17 00:00:00 2001
From: Sven Gothel
-
- In case the drawable {@link #isGLOriented()} and {@link #setSkipGLOrientationVerticalFlip(boolean) vertical flip is not skipped},
- this component performs the required vertical flip to bring the content from OpenGL's orientation into AWT's orientation.
+ A vertical-flip is required, if the drawable {@link #isGLOriented()} and {@link #setSkipGLOrientationVerticalFlip(boolean) vertical flip is not skipped}.
+ In this case this component performs the required vertical flip to bring the content from OpenGL's orientation into AWT's orientation.
+ In case GLSL based vertical-flip is not available,
+ the CPU intensive {@link System#arraycopy(Object, int, Object, int, int) System.arraycopy(..)} is used line by line.
See details about FBO and GLSL vertical flipping.
- 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. + For performance reasons, as well as for GL state sideeffects, + {@link #setSkipGLOrientationVerticalFlip(boolean) skipping vertical flip} is highly recommended!
- In case {@link #setSkipGLOrientationVerticalFlip(boolean) vertical-flip is not skipped} and GLSL based vertical-flip 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. + 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.
Finally the Java2D compositioning takes place via via {@link Graphics#drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver) Graphics.drawImage(...)} @@ -153,7 +153,8 @@ import com.jogamp.opengl.util.texture.TextureState; *
*jogl.gljpanel.noglsl
.
The FBO / GLSL code path uses one texture-unit and binds the FBO texture to it's active texture-target, @@ -167,7 +168,7 @@ import com.jogamp.opengl.util.texture.TextureState; The current gl-viewport is preserved.
- Warning (Bug 842): Certain GL states other than viewport and texture (see above) + Warning (Bug 842): Certain GL states other than viewport and texture (see above) influencing rendering, will also influence the GLSL vertical flip, e.g. {@link GL#glFrontFace(int) glFrontFace}({@link GL#GL_CCW}). It is recommended to reset those states to default when leaving the {@link GLEventListener#display(GLAutoDrawable)} method! We may change this behavior in the future, i.e. preserve all influencing states. -- cgit v1.2.3