Fullscreen causes "Bad display mode" error in Vista (minimal example)

Hello people!

I can create a window without any problems, but when I specify that I want the window in full screen mode I get an error saying "Bad display mode". Here's a minimal code example:

import com.jme.system.DisplaySystem;
import com.jme.system.PropertiesIO;

public class View
   public static void main(String args[])
      DisplaySystem displaySystem = DisplaySystem
      displaySystem.createWindow(800, 600, 24, 60, [b]true[/b]);

The error is:

Exception in thread "main" com.jme.system.JmeException: Bad display mode
at com.jme.system.lwjgl.LWJGLDisplaySystem.selectMode(Unknown Source)
at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(Unknown Source)
at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(Unknown Source)
at View.main(View.java:10)

I have the latest NVIDIA's drivers available. They are slightly over a year old and was downloaded from Lenovo's support pages (there are no drivers for the card at www.nvidia.com(!)).

Thanks in advance.

Warm regards,
Jon Kristensen

Well I got the same message with the code you specified. I guess one of the settings must be bad… But when I use:

public static void main(String args[]){
   DisplaySystem displaySystem = DisplaySystem.getDisplaySystem(PropertiesIO.DEFAULT_RENDERER);
   displaySystem.createWindow(PropertiesIO.DEFAULT_WIDTH, PropertiesIO.DEFAULT_HEIGHT, PropertiesIO.DEFAULT_DEPTH, PropertiesIO.DEFAULT_FREQ, true);

It works just fine.. so just try to find out what settings or supported for your hardware in your OS... or better yet, use the game settings panel which is ready for use... for specifying these settings. See StandardGame and SimpleGame examples for details.

On second look, seems like its the 24bpp that throws it off. It works for me if i substitute the 24 with the default 16.
Mindgamer said:

try to find out what settings or supported for your hardware in your OS


Thank you for your reply. 24 bit color depth wasn't supported.