Results 1 to 6 of 6

Thread: 16Bit Grey Scale Pixel Format

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Salisbury, England
    Posts
    4

    16Bit Grey Scale Pixel Format

    I currently have a successful OpenGL programme for Windows NT4.0. One of the limitations I am finding is the pixel format. I am not really interested in true colour per se, but actually need a grey scale at least 16 bits in length. I can't use color index mode because I need to use blending and fog effects. So, is there some way I can modify the RGBA pixel formats to have, say, a single colour of 16 bits with the remaining colours set to four bits each? Note that I draw to a bitmap, not the screen.
    Can anyone help, please?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2002
    Location
    Earth
    Posts
    154

    Re: 16Bit Grey Scale Pixel Format

    Right now there is no common need for such a pixelformat since most hardware can only deal with 8Bits per colour component anyway.

    Next generation hardware will be able to deal with 10Bit per component and hence introduce extented pixelformats so someday we may even see 16Bit.

    So if you need 16Bit greyscales right now you have to write your own software renderer.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Salisbury, England
    Posts
    4

    Re: 16Bit Grey Scale Pixel Format

    Thanks for your comment. It was the sort of answer I expected, but I didn't want to start down that road if there was an alternative.

    Roy

  4. #4
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Holland
    Posts
    179

    Re: 16Bit Grey Scale Pixel Format

    Roy,

    Don't know if it will help you, but perhaps you can investigate using a combined rgb value as storage for a luminance value. It would involve careful use of blending and fog etc. I guess to make it work, but at least the precision would be available.

    I've not checked this myself, but perhaps pbuffers support pixelformats like luminance (luminance_alpha) with more than 8 bits per channel?

    Good luck.

    Jean-Marc.

  5. #5
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: 16Bit Grey Scale Pixel Format

    Hi !

    If software rendering is ok, then I think Mesa can be compiled to support 16 bit color components.

    I think there is a settings for it somewhere in config.h

    Mikael

  6. #6
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Salisbury, England
    Posts
    4

    Re: 16Bit Grey Scale Pixel Format

    Thanks for your idea Jean-Marc. I had half thought of this without too much consideration of the implications.

    Mikael, you're right. A first glance suggests Mesa does indeed support deep colour channels. I shall definitely investigate this one further.

    Thanks to both of you.

    Roy

Similar Threads

  1. A simple question on displaying an image in grey scale
    By jenny_wui in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-17-2013, 05:30 PM
  2. Grey-scale image > 8 bits on iOS
    By larsimg in forum OpenGL ES
    Replies: 4
    Last Post: 01-16-2013, 05:08 AM
  3. 16 bits per pixel grey scale.
    By KraftDinner in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-18-2009, 10:25 PM
  4. how to show the grey-scale image?
    By in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 09-30-2003, 01:37 PM
  5. How to convert GL_RGB pixel data format (image) to GL_RGBA format
    By Coloro.cl in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 02-13-2002, 06:01 AM

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