diff options
Diffstat (limited to 'src/demos')
-rwxr-xr-x | src/demos/fullscreen/JGearsFullscreen.java | 2 | ||||
-rw-r--r-- | src/demos/gears/Gears.java | 8 | ||||
-rw-r--r-- | src/demos/jgears/JGears.java | 6 | ||||
-rwxr-xr-x | src/demos/jrefract/JRefract.java | 10 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/demos/fullscreen/JGearsFullscreen.java b/src/demos/fullscreen/JGearsFullscreen.java index d9d1134..d9e379f 100755 --- a/src/demos/fullscreen/JGearsFullscreen.java +++ b/src/demos/fullscreen/JGearsFullscreen.java @@ -10,7 +10,7 @@ import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import javax.media.opengl.awt.gl2.GL2JPanel; +import javax.media.opengl.awt.GLJPanel; import javax.media.opengl.util.Animator; import javax.swing.JButton; import javax.swing.JFrame; diff --git a/src/demos/gears/Gears.java b/src/demos/gears/Gears.java index 6b646fe..3faa5b9 100644 --- a/src/demos/gears/Gears.java +++ b/src/demos/gears/Gears.java @@ -13,7 +13,7 @@ import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLEventListener; import javax.media.opengl.awt.AWTGLAutoDrawable; import javax.media.opengl.awt.GLCanvas; -import javax.media.opengl.awt.gl2.GL2JPanel; +import javax.media.opengl.awt.GLJPanel; import javax.media.opengl.util.Animator; /** @@ -135,9 +135,9 @@ public class Gears implements GLEventListener, MouseListener, MouseMotionListene // Special handling for the case where the GLJPanel is translucent // and wants to be composited with other Java 2D content - if ((drawable instanceof GL2JPanel) && - !((GL2JPanel) drawable).isOpaque() && - ((GL2JPanel) drawable).shouldPreserveColorBufferIfTranslucent()) { + if ((drawable instanceof GLJPanel) && + !((GLJPanel) drawable).isOpaque() && + ((GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) { gl.glClear(GL2.GL_DEPTH_BUFFER_BIT); } else { gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); diff --git a/src/demos/jgears/JGears.java b/src/demos/jgears/JGears.java index 0c10bab..42feab9 100644 --- a/src/demos/jgears/JGears.java +++ b/src/demos/jgears/JGears.java @@ -19,7 +19,7 @@ import java.io.InputStream; import java.text.DecimalFormat; import javax.imageio.ImageIO; import javax.media.opengl.GLCapabilities; -import javax.media.opengl.awt.gl2.GL2JPanel; +import javax.media.opengl.awt.GLJPanel; import javax.media.opengl.util.Animator; import javax.swing.JCheckBox; import javax.swing.JFrame; @@ -32,7 +32,7 @@ import javax.swing.JPanel; * This version is equal to Brian Paul's version 1.2 1999/10/21 */ -public class JGears extends GL2JPanel { +public class JGears extends GLJPanel { private static GLCapabilities caps; private long startTime; private int frameCount; @@ -119,7 +119,7 @@ public class JGears extends GL2JPanel { public static void main(String[] args) { JFrame frame = new JFrame("Gear Demo"); frame.getContentPane().setLayout(new BorderLayout()); - final GL2JPanel drawable = new JGears(); + final GLJPanel drawable = new JGears(); drawable.setOpaque(false); JPanel gradientPanel = createGradientPanel(); diff --git a/src/demos/jrefract/JRefract.java b/src/demos/jrefract/JRefract.java index cbf7a2a..5a69a77 100755 --- a/src/demos/jrefract/JRefract.java +++ b/src/demos/jrefract/JRefract.java @@ -57,7 +57,7 @@ import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.GLCapabilities; -import javax.media.opengl.awt.gl2.GL2JPanel; +import javax.media.opengl.awt.GLJPanel; import javax.media.opengl.util.Animator; import javax.media.opengl.util.FPSAnimator; import javax.swing.JCheckBox; @@ -139,10 +139,10 @@ public class JRefract { if (which == INFINITE) { caps.setStencilBits(16); } - final GL2JPanel canvas = + final GLJPanel canvas = (which == GEARS) ? new JGears() : - new GL2JPanel(caps); + new GLJPanel(caps); final DemoListener demoListener = new DemoListener() { public void shutdownDemo() { removeJPanel(canvas); @@ -423,11 +423,11 @@ public class JRefract { }).start(); } - private synchronized void addJPanel(GL2JPanel panel) { + private synchronized void addJPanel(GLJPanel panel) { animator.add(panel); } - private synchronized void removeJPanel(GL2JPanel panel) { + private synchronized void removeJPanel(GLJPanel panel) { animator.remove(panel); } |