PDA

View Full Version : OpenGL in hardware mode



FirstMithrandir
03-20-2003, 03:44 AM
I use opengl and visual c++ 6.0. I link shared dll and
use project with opengl32.lib, glu32.lib and glut32.lib.

On two computers with older TNT 2 (win98) and geforce 256(Win XP) card
everything go in hardware mode. But when I try to run program in another
two computers with Geforce MX2, opengl render only is software mode.

Why it goes this way?

I use standard COpenGLWnd class with section:

static PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
1, // version number
PFD_DRAW_TO_WINDOW | // support window
PFD_SUPPORT_OPENGL | // support OpenGL
PFD_DOUBLEBUFFER, // double buffered
PFD_TYPE_RGBA, // RGBA type
24, // 24-bit color depth
0, 0, 0, 0, 0, 0, // color bits ignored
0, // no alpha buffer
0, // shift bit ignored
0, // no accumulation buffer
0, 0, 0, 0, // accumulation bits ignored
16, // 16-bit z-buffer
0, // no stencil buffer
0, // no auxiliary buffer
PFD_MAIN_PLANE, // main layer
0, // reserved
0, 0, 0 // layer masks ignored
};

The one problem is that the program run on two computers in my home
corectly.
Another is, that it is my MSC degree program and it runes software
opengl in examiner professor computer.

Thanks,
Mithrandir

03-20-2003, 07:29 AM
Try to use color mode of your desctop(32 or 16 bit). New drivers can't set up GL in 16 bit mode if display runs 32. Maybe you are running 16 bpp while trying to set 24?
Also, I won't suggest using 24. Use 32 instead.

Bob
03-20-2003, 08:07 AM
cColorBits is the number of color bits excluding alpha channel, so for 32 bit RGBA, 24 is the correct value. If you need alpha channel, you specify amount of bits in cAlphaBits.

FirstMithrandir
03-20-2003, 10:08 AM
How to get information about actual color deph in windows in opengl or win api?

03-22-2003, 04:01 AM
Bob, it doesn't play any matter. If you set color bits to 32 it could be interpretated as 24 for rgb and 8 undefined. Driver will choose it right.
There was a function like GetDesktopSettings(GetScreenSettings) or so. Look in Win32 SDK.