aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-27 07:55:31 +0100
committerSven Gothel <[email protected]>2010-11-27 07:55:31 +0100
commit86c164950b0a0d351fc8af3884187b10201b6237 (patch)
tree498535608116440d9122db89af33f7f8c998378f /src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
parentc6c30d46bc9c6ff472e35cf592713297b1ef7409 (diff)
GLCanvas: Fix disableBackgroundErase/X11, make drawable creation more robust, doc Java2D/AWT properties.
On X11 disableBackgroundErase() must happen before native peer creation, this patch issues it before and after super.addNotify(). Make drawable creation more robust, ie only create a drawable in case the size is > 0x0 and do this check/create at display/paint in case size it not yet determined. Add documentation about Java2D/AWT properties impact on GLCanvas. Make JUnit tests on AWT/GLProfile's more robust, while adding frame validate() ensuring 1st paint will have a size, hence will create the drawable. This is necessary for eg. AMD GPU's and GL context > 3.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt/GLJPanel.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index c69603e41..5c6be8bc4 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -61,13 +61,13 @@ import com.jogamp.opengl.impl.awt.*;
/** A lightweight Swing component which provides OpenGL rendering
support. Provided for compatibility with Swing user interfaces
when adding a heavyweight doesn't work either because of
- Z-ordering or LayoutManager problems. <P>
-
+ Z-ordering or LayoutManager problems.
+ <P>
The GLJPanel can be made transparent by creating it with a
GLCapabilities object with alpha bits specified and calling {@link
#setOpaque}(false). Pixels with resulting OpenGL alpha values less
- than 1.0 will be overlaid on any underlying Swing rendering. <P>
-
+ than 1.0 will be overlaid on any underlying Swing rendering. </P>
+ <P>
Notes specific to the Reference Implementation: This component
attempts to use hardware-accelerated rendering via pbuffers and
falls back on to software rendering if problems occur.
@@ -79,8 +79,10 @@ import com.jogamp.opengl.impl.awt.*;
This behavior is correct, as the textures and display lists for
the GLJPanel will have been lost during the resize operation. The
application should attempt to make its GLEventListener.init()
- methods as side-effect-free as possible. <P>
-
+ methods as side-effect-free as possible. </P>
+ <P>
+ * Please read <A HREF="GLCanvas.html#java2dgl">Java2D OpenGL Remarks</A>.
+ * </P>
*/
public class GLJPanel extends JPanel implements AWTGLAutoDrawable {