1.5 beta 2 openGL pipeline in fullscreen.

Thanks for your interest:

I used System.setProperty("sun.java2d.opengl","True"); to use the new openGL pipeline and found

that I can run my game in windowed mode with unprecedented performance (accelerated text, primitive

shapes, etc.) however, I get an error when in fullscreen mode:

Exception in thread "main" java.lang.IllegalArgumentException: Invalid display mode

at sun.awt.Win32GraphicsDevice.setDisplayMode(Unknown Source)

(I didn't have this before I set the OpenGL flag to True)

Here's how I have my app set up:WIDTH = 640

HEIGHT = 480

BIT_DEPTH =default

REFRESH = DisplayMode.REFRESH_RATE_UNKNOWN

I've querried to make sure these settings are OK for a valid 'DisplayMode': DEVICE = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();

DEVICE.setFullScreenWindow(FRAME);

test_Graphics_Device();// this is where I test for valid DisplayMode

DEVICE.setDisplayMode(new DisplayMode(WIDTH, HEIGHT, BIT_DEPTH, REFRESH));// this is where the error line is

FRAME.createBufferStrategy(2);

Any suggestions would be greatly appreciated!

[1319 byte] By [afarmand] at [2007-9-30 12:29:05]
# 1
Make sure the DisplayMode object you pass into setDisplayMode() is 1 obtained from getDisplayModes().
Abuse at 2007-7-4 16:02:19 > top of Java-index,Other Topics,Java Game Development...
# 2
That was exactly it! Thanks.
afarmand at 2007-7-4 16:02:19 > top of Java-index,Other Topics,Java Game Development...