nanogui: Thread: GR_PIXELVAL for TRUECOLOR555


[<<] [<] Page 1 of 1 [>] [>>]
Subject: GR_PIXELVAL for TRUECOLOR555
From: Leonid Romanov ####@####.####
Date: 21 Sep 2001 10:30:56 -0000
Message-Id: <20010921143044.2414ee49.leonidr@creware.com>

Hi!
Can anybody tell me why GR_PIXELVAL is defined as unsigned long for TRUECOLOR555 format?
Should I allocate array of longs for TRUECOLOR555 image pixels or array of shorts?

Thanks in advance. Leonid.
Subject: Re: [nanogui] GR_PIXELVAL for TRUECOLOR555
From: Jordan Crouse ####@####.####
Date: 21 Sep 2001 14:28:07 -0000
Message-Id: <01092108252400.19633@cosmic>

GR_PIXELVAL is always an unsigned long.  It is used as an internal 
representation of color values which then get converted to their correct 
format in the screen drivers.  Check include/device.h for some of the 
conversion macros that we use.

How you should store your arrays depends on which functions you are calling.  
If you are creating an image, then the data should be formated like the image 
requires.   If you are doing a GrArea() call, the function will allow you to 
pass in a flag that give you the choice of storing your values in which ever 
format you like.

Hope this helps,
Jordan

On Friday 21 September 2001 04:30, Leonid Romanov mentioned:
> Hi!
> Can anybody tell me why GR_PIXELVAL is defined as unsigned long for
> TRUECOLOR555 format? Should I allocate array of longs for TRUECOLOR555
> image pixels or array of shorts?
>
> Thanks in advance. Leonid.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
Subject: Re: [nanogui] GR_PIXELVAL for TRUECOLOR555
From: "Greg Haerr" ####@####.####
Date: 24 Sep 2001 15:45:56 -0000
Message-Id: <0eba01c144fc$123fc120$3aba46a6@xmission.com>

: Can anybody tell me why GR_PIXELVAL is defined as unsigned long for
TRUECOLOR555 format?
: Should I allocate array of longs for TRUECOLOR555 image pixels or array of
shorts?

GR_PIXELVAL should be an unsigned short for TRUECOLOR555 format.  Currently,
this is in error, it seems when I quickly added 555 support, I forgot to change
it
to work just like the 565 cases.

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.