PDA

View Full Version : Determine if Software-Rendering is used



pgmeiner
07-25-2002, 03:29 AM
How can i determine if OpenGL will use the Software-Implementation and not the accelerated Hardware. I had to determine this before initializing any OpenGL thing. How can i achieve this??

Thanks in advance

P. Gmeiner

MattS
07-25-2002, 05:26 AM
I do it like this:

/* nPixelFormat has already been determined by ChoosePixelFormat and the hDC is valid */

PIXELFORMATDESCRIPTOR pfd;
DescribePixelFormat(hDC, nPixelFormat, sizeof(pfd), &pfd)

if(pfd.dwFlags & PFD_GENERIC_FORMAT)
// you are software rendering

If you are using GLUT you may need to do some extra work to get the pixel format and HDC.

kon
07-25-2002, 06:17 AM
But you can still fall back to SW-rendering using functions which are not HW-accelerated (for example glAccum on most consumer cards).

kon

Mezz
07-25-2002, 06:19 AM
Actually, this kicks up a question I've been wanting to ask for some time... Why don't vendors support hardware accumulation buffers?

(I'm sure there are other GL features that are not hardware accelerated either, but why havent they bothered with them?).

-Mezz

Julien Cayzac
07-25-2002, 06:34 AM
Originally posted by Mezz:
Actually, this kicks up a question I've been wanting to ask for some time... Why don't vendors support hardware accumulation buffers?


Because hw accelerating accumulation buffers means adding more transistors, and more transistors leads to higher prices.

I prefer $200 high end cards and partial emulation...

Julien.

V-man
07-25-2002, 09:21 AM
But how much more will it complicate things? The accum buffer is 64bpp by default, so it needs twice the space, but memory is plentiful now.
That's one problem solved. As for the transistor count, I'm not convinced by that argument. I think its because some vendors figure most people don't need it so it's a waste.

The need for higher precision is still there, either an integer accum buffer or some float point buffer.


The problem is beeing dealt with only now.

V-man