diff options
author | Kenneth Russel <[email protected]> | 2008-11-20 23:53:23 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-11-20 23:53:23 +0000 |
commit | f25bdef3b6bc423a08390ab17e86897c85b71282 (patch) | |
tree | c15a27782e0c17e6ca2c25ae25cbbd760f9ac6f8 /src/demos/cubefbo/Main.java | |
parent | c91b1be4cd9ab39be883f3578fcc4da3511e1ee1 (diff) |
Applied second jogl-demos patch from Michael Bien. Adjusted build.xml
to not try to compile jbullet sources, and to merge the ES1 and ES2
targets. To build the full set of demos (including the OpenGL ES
demos), run "ant". To build just the OpenGL ES demos, run
"ant -Djogl.es=1".
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@290 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/cubefbo/Main.java')
-rwxr-xr-x | src/demos/cubefbo/Main.java | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/src/demos/cubefbo/Main.java b/src/demos/cubefbo/Main.java index b1db392..57e8947 100755 --- a/src/demos/cubefbo/Main.java +++ b/src/demos/cubefbo/Main.java @@ -42,38 +42,22 @@ import javax.media.opengl.util.Animator; import javax.media.opengl.util.FPSAnimator; -public class Main -{ - - private Animator animator; - -/** - public void init() { - setLayout(new BorderLayout()); - GLCanvas canvas = new GLCanvas(); - canvas.addGLEventListener(new FBCubes()); - canvas.setSize(getSize()); - add(canvas, BorderLayout.CENTER); - animator = new FPSAnimator(canvas, 30); - } - - public void start() { - animator.start(); - } - - public void stop() { - // FIXME: do I need to do anything else here? - animator.stop(); - } - */ +public class Main { public static void main(String[] args) { - Frame frame = new Frame("FBCubes Demo ES 1.1"); + GLCapabilities caps = new GLCapabilities(); GLCanvas canvas = new GLCanvas(caps); - canvas.addGLEventListener(new FBCubes()); + + FBCubes cubes = new FBCubes(); + canvas.addMouseListener(cubes); + canvas.addMouseMotionListener(cubes); + canvas.addGLEventListener(cubes); + + Frame frame = new Frame("FBCubes Demo ES 1.1"); frame.add(canvas); frame.setSize(800, 480); + final Animator animator = new FPSAnimator(canvas, 60); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { |