valid pixel format exception - mouse to blame?

Started by DrSnuggles, March 22, 2007, 15:19:07

Previous topic - Next topic

DrSnuggles

Hi!

I'm developing a game in Java using lwjgl and the EasyWay game engine (http://sourceforge.net). On some machines, I get an error thrwon stating that no valid pixel format could be found. OK, so far, so bad, but:

On one machine, a Toshiba laptop, all worked well, until yesterday - when I plugged in a Microsoft USB mouse and changed the mouse pointer. Now lwjgl throws an exception and quits. So, it can't be the graphics card, it can't be the graphic drivers - as until yesterday all worked well.

To get EasyWay (and lwjgl) running again is very important for me, as I'm working on a project that has to be ready soon - and my boss will kill me if the game won't run on some machines. Maybe it's just an annoying routine used by the mouse driver that causes all the hassle. If anyone has any idea what I could do, this would make me very glad.

BTW, unplugging the mouse, switching back to the built-in mouse equvalent in the keyboard and setting all mouse pointer options back to normal didn't help. But this was definitely the only change I had made, no new software or other stuff.  ???

Cheers
Dr Snuggles

Matzon

the actual exception would be informational...
That said, lwjgl will not work on some machines, due to bad graphics drivers!

DrSnuggles

The exception is:

org.lwjgl.LWJGLException: Could not find a valid pixel format
	at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
	at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
	at org.lwjgl.opengl.WindowsDisplayPeerInfo.<init>(WindowsDisplayPeerInfo.java:50)
	at org.lwjgl.opengl.WindowsDisplay.createPeerInfo(WindowsDisplay.java:287)
	at org.lwjgl.opengl.Display.create(Display.java:681)
	at org.lwjgl.opengl.Display.create(Display.java:657)
	at org.lwjgl.opengl.Display.create(Display.java:641)
	at org.easyway.system.Core.createWindow(Core.java:225)
	at org.easyway.system.Core.init(Core.java:199)
	at org.easyway.system.Sincro.run(Sincro.java:62)


I got the same problem on two machines; and, as stated above, on a machine that was running lwjgl perfectly until I changed the mouse. Some kind of fall-back-routine (as switching to software rendering) or anything that would make it work anyhow (better slow than not at all) would be great. If I can You provide with further details, please let me know.

DrSnuggles

Ups, there's another thing I changed. I had put my code into a CVS and checked it back out again. Might it be that some path, library etc is configured wrong and that pixel-format-error ist a file path (or something similiar) error I don't see?

Matzon

the problem is that it can't find a valid display mode - what that has to do with a mouse being plugged in is beyond me (and it most likely doesn't!).
you can force software mode by passing a switch - check the hidden arguments doc in the doc folder

DrSnuggles

I don't know for sure if the mouse is to blame; yet, it was the only thing I changed. Maybe the mouse pointer stuff somehow bends some graphic routines?  ???

Unfortunately, switching to Software Rendering didn't help. Trying different Screen Resolutions and Color Depths didn't help. Installing new Graphic Drivers didn't help.

Might I somehow override the fetching of the display data and just tell him to use that resolution, that refresh rate, that color depth? Doing it by hand, so to say? Maybe retreiving the display info is the only problem he has?

Cheers and best Wishes!