LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: krasse on May 18, 2009, 20:46:25

Title: Calling Display.create(Pixelformat) before or after setting fullscreen?
Post by: krasse on May 18, 2009, 20:46:25
I used to call setDisplayMode() and setFullscreen() before Display.create(), but today when I changed some pixel format parameters I discovered that LWJGL crashes when I try to set fullscreen to true before setting the pixel format. It works when I set the pixel format first (through Display.create()) or don't use the fullscreen mode.
Also, it is that nasty "Pixel format not accelerated" exception which usually means that the driver is outdated, but mine is the latest available.

Is there a prefered order to do this?

When I think about it it makes a lot of sense to create the display with a pixel format first, but it has worked on so many computers before so I am a bit confused.

If it is of any help I am running Windows Vista 32 bit Home Premium with an NVIDIA GeForce 8600M GT.
Title: Re: Calling Display.create(Pixelformat) before or after setting fullscreen?
Post by: princec on May 18, 2009, 22:29:07
There shouldn't be a preferred order at all; all combinations should "just work", and if they don't, it's quite probably a bug. Sometimes it's drivers but not in this case I don't think.

Cas :)
Title: Re: Calling Display.create(Pixelformat) before or after setting fullscreen?
Post by: krasse on May 19, 2009, 05:48:41
OK, thanks. I will investigate this further and try to narrow it down some more.