Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: OpenGL in hardware mode

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2003
    Posts
    2

    OpenGL in hardware mode

    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

  2. #2
    Guest

    Re: OpenGL in hardware mode

    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.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: OpenGL in hardware mode

    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.

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2003
    Posts
    2

    Re: OpenGL in hardware mode

    How to get information about actual color deph in windows in opengl or win api?

  5. #5
    Guest

    Re: OpenGL in hardware mode

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •