diff options
author | sg215889 <[email protected]> | 2009-07-13 02:12:16 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-13 02:12:16 -0700 |
commit | a29817b54313d481abd6a594262159a589ce743b (patch) | |
tree | 6baabfbf1dbb0352d670493aeff5acee2d73490c /src | |
parent | 12a185ccdf8c306c7cbdcafb9a0364cd9d1a4354 (diff) |
Add CDC/CVM support ..
Diffstat (limited to 'src')
-rwxr-xr-x | src/demos/applets/RedSquareNEWTAWTApplet.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/demos/applets/RedSquareNEWTAWTApplet.java b/src/demos/applets/RedSquareNEWTAWTApplet.java new file mode 100755 index 0000000..dce71ca --- /dev/null +++ b/src/demos/applets/RedSquareNEWTAWTApplet.java @@ -0,0 +1,33 @@ +package demos.applets; + +import java.applet.*; +import java.awt.*; +import demos.gears.Gears; +import javax.media.opengl.awt.GLCanvas; +import com.sun.opengl.util.Animator; +import com.sun.opengl.util.FPSAnimator; + +/** Shows how to deploy an applet using JOGL. This demo must be + referenced from a web page via an <applet> tag. */ + +public class RedSquareNEWTAWTApplet extends Applet { + private Animator animator; + + public void init() { + setLayout(new BorderLayout()); + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new Gears()); + canvas.setSize(getSize()); + add(canvas, BorderLayout.CENTER); + animator = new FPSAnimator(canvas, 60); + } + + public void start() { + animator.start(); + } + + public void stop() { + // FIXME: do I need to do anything else here? + animator.stop(); + } +} |