Hi,
I’m playing a bit with Jogl because i like very much both APIs (LWJGL and JOGL) and i can’t choose only one to use in my programs :).
So i know that LWJGL has its own native window system, so we can get a true fullscreen even on Linux.
But JOGL depends on AWT for the window part, and i’ve heard that Linux has no true fullscreen with AWT.
Okay, but what’s a true fullscreen ? With AWT, set a true fullscreen must be done with the setFullScreenWindow() method from de the GraphicsDevice class ?
But isFullScreenSupported() returns allways false on my system (Ubuntu Hoary and Breezy and JDK 1.5). But with the JDK 1.6, it returns “true”, and yes, i get a fullscreen exclusive mode (for example, i can’t switch between different desktops).
So with JDK 1.6, we have a true fullscreen (and certainly better performances) on Linux and AWT is no more a problem for JOGL, or am i wrong ?
But there is the problem of display change. isDisplayChangeSupported() allways returns “false” on my computer (Ubuntu, nvidia drivers, JDK 1.5_05 and JDK 1.6-b55).
Is there somebody who have display change supported on Linux ?
Will it be corrected in the next build of JDK 1.6 ?
Thanks for your answers, and sorry for my english, i’m a french speaker :).
If you want to try a little test that i’ve make and share the ouput of the class :
import java.awt.Frame;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class FSMTest {
static Frame frame;
public static void main(String[] args) {
frame = new Frame("Test");
pressKey();
GraphicsDevice graphicsDevice = GraphicsEnvironment
.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if (graphicsDevice.isFullScreenSupported()) {
System.out.println("FS Exclusive Mode supported");
} else {
System.out.println("FS Exclusive Mode non supported");
}
frame.setUndecorated(true);
graphicsDevice.setFullScreenWindow(frame);
if (graphicsDevice.isDisplayChangeSupported()) {
System.out.println("Display change supported");
} else {
System.out.println("Display change non supported");
}
System.out.println("JVM version : "
+ System.getProperty("java.version"));
}
public static void pressKey() {
final int _KEY = KeyEvent.VK_ESCAPE;
frame.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if (e.getKeyChar() == _KEY) {
System.exit(0);
}
}
public void keyTyped(KeyEvent e) {
}
public void keyReleased(KeyEvent e) {
}
});
}
}
Press escape to exit the fullscreen application.