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 2 of 2

Thread: glDrawPixels : How to display 10-Bit pixel-values ??

  1. #1
    Guest

    glDrawPixels : How to display 10-Bit pixel-values ??

    I use the following line to display an Image-Array. Each value in

    byte Image[x][y];

    is one BYTE (or 8 Bit) long. Now I want to display 10-BIT long values. Is this possible with glDrawPixels? How do I have to modify the command below and the declaration of Image[x][y] above??

    glDrawPixels (ChipWidth,ChipHeight,GL_RGB,GL_UNSIGNED_BYTE,*Ima ge);

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,142

    Re: glDrawPixels : How to display 10-Bit pixel-values ??

    You can't directly display 10 bit values, you'll have to extend them to 16 bit (shift left by 6 bit) and use GL_UNSIGNED_SHORT.

    But as the framebuffer has only 8 bit by default, the extra precision will get cut off anyway, except when you're rendering to a float texture or some similar high precision target.

Posting Permissions

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