LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: darkmoon on November 29, 2006, 20:21:02

Title: How to detect driver problem in applet?
Post by: darkmoon on November 29, 2006, 20:21:02
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?
Title: How to detect driver problem in applet?
Post by: darkprophet on November 30, 2006, 12:20:24
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
Title: How to detect driver problem in applet?
Post by: darkmoon on November 30, 2006, 15:13:37
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.
Title: Re: How to detect driver problem in applet?
Post by: cornholio on January 05, 2007, 07:50:00
problem solved here: http://lwjgl.org/forum/index.php/topic,2003.0.html (http://lwjgl.org/forum/index.php/topic,2003.0.html)