How to detect driver problem in applet?

Started by darkmoon, November 29, 2006, 20:21:02

Previous topic - Next topic

darkmoon

I have detected the following problem: on a system which has an unsupported graphics driver (according to other lwjgl games), the initGL and paintGL methods of AWTGLCanvas are never called.

When turning on debug, i get the following message:
Failed to lock surface, skipping paint(): org.lwjgl.LWJGLException: Could not find a valid pixel format
Pixel format not accelerated

I'd like to detect this situation and show a dialog, but there are no exceptions being thrown. Is there another way to detect this? I saw in the AWTGLCanvas paint method that this exception is indeed caught and not thrown up. Maybe in the case of driver problems it's better to throw it up?
Bubblomania - free, online, cute and psychedelic arcade game!
My Blog

darkprophet

are you specifying an "out of ordinary" pixel format?

In a case like this, you need to catch the LWJGLException, and retry with another pixel format...

DP

darkmoon

It's an applet, so I'm just using AWTGLCanvas, without specifying any pixel foemat. I do catch exceptions, but none are thrown. The exception is caught in LWJGL code and not passed to my code. Sorry if I wasn't clear.
Bubblomania - free, online, cute and psychedelic arcade game!
My Blog