Hardware examination

Started by ErDetEnAnd?, March 30, 2010, 05:58:31 PM

Previous topic - Next topic

ErDetEnAnd?

A change of OpenGL video settings might cause the screen image to go blank, since the hardware doesn't support the new settings.
Is it somehow possible to look into the VRAM pixels of the rendered image, and this way determine however the current video mode is supported or not?

- Ducky.

EgonOlsen

Yes, you can get the pixels back from the screen by using FrameBuffer.getPixels(); As long as you are using the normal GL renderer, this should work fine. When using the AWTGLRenderer, make sure that you don't call it from inside the awt event dispatch thread or else you'll wait forever for the pixels.

However, i'm not sure if this is the best method. Wouldn't it be better to not allow these modes based on the hardware beforehand?

ErDetEnAnd?

The problem is AA support and old graphic drivers. Is there another way for checking this?

EgonOlsen

None that i know of. Which version of jPCT, which renderer and which graphics hardware is that? I applied some fixes for AA initialization failing on Intel in the last betas.

ErDetEnAnd?

The jPCT version is 1.15 beta 3.
Using both OpenGL renderer on a AWTCanvas and software renderer, but only having the problem using the OpenGL.
Another issue is that the underlying hardware is unknown.
Do you have a link to the that beta you're mentioning?

EgonOlsen

Sure. This is the latest jar: http://www.jpct.net/download/beta/jpct.jar

And this one is a little older, but contains a recent Javadoc: http://www.jpct.net/jpct-ae/download/alpha/jpctapi_121a.zip

It includes some fixes especially for the AWTGLRenderer, which used to fail when the hardware didn't support the requested AA mode. It should be able to fall back to non-AA in this case now.



ErDetEnAnd?

Excellent. I'll try it.

Thanks.