I am new working with JME, I think I didn't do somethig as I should. I got this trouble.

GRAVE: Main game loop broken by uncaught exception

java.lang.Error: Cannot create window: Could not find a valid pixel format

at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(LWJGLDisplaySystem.java:438)

at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(LWJGLDisplaySystem.java:141)

at com.jmex.game.StandardGame.initSystem(StandardGame.java:214)

at com.jmex.game.StandardGame.run(StandardGame.java:144)

at java.lang.Thread.run(Unknown Source)

please how can I fix it.

Another thing, please tell If with this framework I will be able to load sketch up files, or vrml's or something compatible with SketchUp.


Wilfredo Vargas Almendras

No valid pixel format sounds like a driver issue to me.

In my experience, this usually means that you are not setting valid display properties (width/height and bit depth) or your video card's drivers need to be updated.

I've come across this a lot with older computers with out-of-date graphics drivers.

Question to developers: Would it be a good idea to have a way to check for this before it is thrown and set a default (and safer) set of display properties?

I agree with this.

Maybe the Splash-Screen-settings are not supported or the changes he made are unsupported by his Drivers.

With my OpenSuse and Flatscreen i hav a similar problem: must use 75Hz instead og 60Hz.

Otherwise i got this exception too.

Are there any happy go lucky safe settings that can be used as a default for these, any way to find out what setting will work on the machine ??

The problem is that the display modes shown on the resolution dialog are what are said to be valid by LWJGL which in turn asks the drivers. However, we can probably go ahead and throw this making the application responsible for dealing with it, rather than just killing it at the jME level.

Would make the start of the games much more user friendly, will just leave the game developer to add something so the user can tweak if desired, also maybe to auto adjust the depth if the comp isnt keeping up with the game;

Ok, made a couple slight modifications. Error is no longer thrown in LWJGLDisplaySystem (Errors are not meant to be caught) instead throwing a JmeException, as does StandardGame (throws JmeExceptions up to the caller of run, etc). Other apps, will have the same init methods throw the exception. Thus, the exception should reach the client app code to be handled properly. This will be in for next checkin.