Author Topic: Hardware examination  (Read 1929 times)

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Hardware examination
« on: March 30, 2010, 05:58:31 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11968
    • View Profile
    • http://www.jpct.net
Re: Hardware examination
« Reply #1 on: March 30, 2010, 08:16:27 pm »
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?

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Re: Hardware examination
« Reply #2 on: March 30, 2010, 08:25:08 pm »
The problem is AA support and old graphic drivers. Is there another way for checking this?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11968
    • View Profile
    • http://www.jpct.net
Re: Hardware examination
« Reply #3 on: March 30, 2010, 08:35:23 pm »
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.

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Re: Hardware examination
« Reply #4 on: March 30, 2010, 08:45:59 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11968
    • View Profile
    • http://www.jpct.net
Re: Hardware examination
« Reply #5 on: March 30, 2010, 08:55:11 pm »
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.



Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Re: Hardware examination
« Reply #6 on: March 30, 2010, 08:57:30 pm »
Excellent. I'll try it.

Thanks.