summaryrefslogtreecommitdiffstats
path: root/src/demos/es1/angeles/Main.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-06-01 10:43:49 +0000
committerSven Gothel <[email protected]>2008-06-01 10:43:49 +0000
commit04053312e8b8d27fb95aed807009a58489025923 (patch)
treeb71d195235e9e6dd6e2f94f6366f018fe8b1a955 /src/demos/es1/angeles/Main.java
parent274786395d995674eb4b776451795e045ba714dc (diff)
wip
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@241 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/es1/angeles/Main.java')
-rwxr-xr-xsrc/demos/es1/angeles/Main.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/demos/es1/angeles/Main.java b/src/demos/es1/angeles/Main.java
index a79139d..b5b74d0 100755
--- a/src/demos/es1/angeles/Main.java
+++ b/src/demos/es1/angeles/Main.java
@@ -7,10 +7,16 @@ import com.sun.javafx.newt.*;
public class Main implements MouseListener {
public boolean quit = false;
+ public boolean toggleFS = false;
public void mouseClicked(MouseEvent e) {
- if(e.getClickCount()>1) {
- quit=true;
+ switch(e.getClickCount()) {
+ case 1:
+ toggleFS=true;
+ break;
+ default:
+ quit=true;
+ break;
}
}
public void mouseEntered(MouseEvent e) {
@@ -39,9 +45,8 @@ public class Main implements MouseListener {
// Size OpenGL to Video Surface
int width = 800;
int height = 480;
- if (!window.setFullscreen(true)) {
- window.setSize(width, height);
- }
+ window.setSize(width, height);
+ window.setFullscreen(true);
// Hook this into EGL
GLDrawableFactory factory = GLDrawableFactory.getFactory(GLDrawableFactory.PROFILE_GLES1, window);
@@ -69,6 +74,12 @@ public class Main implements MouseListener {
do {
angel.display(gl);
drawable.swapBuffers();
+
+ if(ml.toggleFS) {
+ window.setFullscreen(!window.isFullscreen());
+ ml.toggleFS=false;
+ }
+
window.pumpMessages();
// Thread.yield();