Results 1 to 2 of 2

Thread: Hardware Acceleration at 8 bit colordepth

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    24

    Hardware Acceleration at 8 bit colordepth

    Hello,

    i have to setup opengl for working under 8 bit color-depth. this is how i setup the pixel-format-descriptor :

    PIXELFORMATDESCRIPTOR pfd;

    memset(&pfd, 0, sizeof PIXELFORMATDESCRIPTOR));

    pfd.nSize = sizeof(pfd);
    pfd.nVersion = 1;
    pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
    pfd.iPixelType = PFD_TYPE_RGBA;
    pfd.cColorBits = 8;
    pfd.iLayerType = PFD_MAIN_PLANE;
    pfd.cDepthBits = 16;

    after choosing the nearest pixelformat by using the "ChoosePixelFormat"-function, i get a description of the selected one by the "DescribePixelFormat"-function. The recieved pixelformat has 8 bit like desired, but the color white looks black and black is white. it seems that all colors are wrong. So what is wrong with this code. Maybe someone can help!?!

    Best regards

    tabor25

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Hardware Acceleration at 8 bit colordepth

    First you are not getting 8 bit hardware acceleration, I do not know of a video card that has 8 bit 3D acceleration. Most only get the accereleration at 16 to 32 bit, others only in 32 bit mode.

    I am guessing you are getting the wrong color due to the fact you are not properly setting up the screen. From looking at your code you have a 16 bit screen with a 8 bit color, that mean's that 8 bit's have to control 16 bit's of color!

    Originally posted by tabor25:
    Hello,

    i have to setup opengl for working under 8 bit color-depth. this is how i setup the pixel-format-descriptor :

    PIXELFORMATDESCRIPTOR pfd;

    memset(&pfd, 0, sizeof PIXELFORMATDESCRIPTOR));

    pfd.nSize = sizeof(pfd);
    pfd.nVersion = 1;
    pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
    pfd.iPixelType = PFD_TYPE_RGBA;
    pfd.cColorBits = 8;
    pfd.iLayerType = PFD_MAIN_PLANE;
    pfd.cDepthBits = 16;

    after choosing the nearest pixelformat by using the "ChoosePixelFormat"-function, i get a description of the selected one by the "DescribePixelFormat"-function. The recieved pixelformat has 8 bit like desired, but the color white looks black and black is white. it seems that all colors are wrong. So what is wrong with this code. Maybe someone can help!?!

    Best regards

    tabor25

Similar Threads

  1. About hardware acceleration
    By T.james in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 06-15-2006, 02:46 PM
  2. Hardware Acceleration
    By in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 01-30-2006, 05:42 AM
  3. Replies: 1
    Last Post: 06-17-2004, 08:02 AM
  4. GLX and hardware acceleration..
    By Ozzy in forum OpenGL: Linux
    Replies: 6
    Last Post: 09-21-2001, 01:10 AM
  5. About hardware acceleration
    By jxruan in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 07-21-2001, 03:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean