Error when changing color depth!

Hi,

Im trying to change the game settings after I start my StandardGame:

It works fine when changing resolution and frequency

but when i try to change the color depth from 32 to 16 i get this ugly error  :expressionless:





org.lwjgl.LWJGLException: Pixel format not accelerated
        at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
        at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
        a
        at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:174)
        at org.lwjgl.opengl.Display.createWindow(Display.java:308)
        at org.lwjgl.opengl.Display.setDisplayMode(Display.java:251)
        at com.jme.system.lwjgl.LWJGLDisplaySystem.reinitDisplay(LWJGLDisplaySystem.java:485)
        at com.jme.system.lwjgl.LWJGLDisplaySystem.recreateWindow(LWJGLDisplaySystem.java:261)
        at com.jmex.game.StandardGame$1.call(StandardGame.java:418)
        at com.jme.util.GameTask.invoke(GameTask.java:140)
        at com.jme.util.GameTaskQueue.execute(GameTaskQueue.java:111)
        at com.jmex.game.StandardGame.update(StandardGame.java:378)
        at com.jmex.game.StandardGame.run(StandardGame.java:250)
        at java.lang.Thread.run(Thread.java:619)
Jan 18, 2010 3:15:08 AM com.jmex.game.DefaultUncaughtExceptionHandler uncaughtException
SEVERE: Main game loop broken by uncaught exception
java.lang.Error: Cannot recreate window: Pixel format not accelerated
        at com.jme.system.lwjgl.LWJGLDisplaySystem.reinitDisplay(LWJGLDisplaySystem.java:490)
        at com.jme.system.lwjgl.LWJGLDisplaySystem.recreateWindow(LWJGLDisplaySystem.java:261)
        at com.jmex.game.StandardGame$1.call(StandardGame.java:418)
        at com.jme.util.GameTask.invoke(GameTask.java:140)
        at com.jme.util.GameTaskQueue.execute(GameTaskQueue.java:111)
        at com.jmex.game.StandardGame.update(StandardGame.java:378)
        at com.jmex.game.StandardGame.run(StandardGame.java:250)
        at java.lang.Thread.run(Thread.java:619)



here is my code


                GameStateManager.getInstance().deactivateAllChildren();
                MyStandardGame.getInstance().getSettings().setDepth(16);
                OpenGL.getInstance().reinitVideo();
                GameStateManager.getInstance().activateAllChildren();



does anyone have a clue about this?!

"Pixel format not accelerated"

It seems like your Graphics Card has no hardware acceleration for bit depths as low as 16bit. And I frankly dont see the point in wanting one below 24bit. Jme2 does not run on phones yet :wink:

thanks for the fast reply

well actually im not willing to run my game on phones anyway…

Im just creating an options menu for the game and trying to make the video settings as flexible as possible …

the weird thing is that if I set the color depth to 16 and then run the game, it works just fine :S

so i guess its not a hardware/driver issue right?

ahh wait wait … i am wrong, the same error occurs when i set the color to 16 before i run the game

so it could be a hardware thing !

I found out the problem:

Its not possible to set the color depth to 16 and the alpha bits > 1 at the same time!