How to use Fullscreen in JOGL

Hello!

I would like to create a frame with only a GLCanvas component with fullscreen rendering… How can I create it? Is there any jogl-utility?
If i start my game, I would like to set the fullscreen modes: 1280x1024x16 or 1280x1024x32 or 1024x768x32 and so on…

Thanks.

Check out the Sun official fullscreen tutorial: http://java.sun.com/docs/books/tutorial/extra/fullscreen/

It will teach you how to make a JFrame fullscreen. You can then add your GLCanvas to the JFrame and have a fullscreen GLCanvas.

For this, this works under Windows. I get wierd exceptions under MacOSX.

Thanks a lot!

I’s working!

How can I set a window to windowed mode If it is in fullScreen mode already? Can I change these modes? (windowed-fullscreen-windowed)

There is a method to set fullscreen: displayDevice.setFullScreenWindow( currentWindow );
but for windowed mode, there isn’t…

To get back out of fullscreen use:

displayDevice.setFullScreenWindow(null);

Cheers

Peter