What is about using the fullscreen mode in JOGL? Is it possible or will it be possible in future?
Although I can’t answer this for the general case, I can share a MacOS X specific solution:
quicktime.std.movies.FullScreen fullscreen = new quicktime.std.movies.FullScreen();
try {
fullscreen.beginFullScreen(0);
} catch (StdQTException e) {
e.printStackTrace();
}
Window f = new Window(new Frame());
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
f.setBounds(0,0,screenSize.width,screenSize.height);
It should be noted that the Quicktime code is needed to hide the menubar and the dock, otherwise the other code is pretty much universal. Note, that you may should think about how you want to handle the case of multiple screens.
[quote=“ajmas,post:2,topic:25281”]
You shouldn’t need QT to hide the doc or menubar. If you do things in the correct order you wont see those in full screen exclusive mode using the standard cross-platform Java APIs.
I forgot about that. Here is an example:
Window f = new Window(new Frame());
GraphicsEnvironment graphEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
graphEnv.getDefaultScreenDevice().setFullScreenWindow(f);
For more info: http://java.sun.com/docs/books/tutorial/extra/fullscreen/
See also the demos/fullscreen directory in the jogl-demos workspace for some working examples of fullscreen with JOGL. The Grand Canyon demo (source code available on its web page) also has fullscreen support which works on all of JOGL’s supported platforms as long as the underlying JDK supports it; Java SE 6 (Mustang) adds full-screen support for Linux.