nanogui: TRUECOLOR 565


Previous by date: 30 Sep 2005 21:37:04 +0100 Re: nano-X and alha blending, Jordan Crouse
Next by date: 30 Sep 2005 21:37:04 +0100 Clearing a certain area of a window, tj
Previous in thread: 30 Sep 2005 21:37:04 +0100 Re: TRUECOLOR 565, Jimmy Walker
Next in thread:

Subject: Re: [nanogui] TRUECOLOR 565
From: "Greg Haerr" ####@####.####
Date: 30 Sep 2005 21:37:04 +0100
Message-Id: <12c901c5c5fe$7ef5f320$0300a8c0@RDP>

: My question is when using MWRGB with a TRUECOLOR 565
: setting should I just use the top 5 or 6 bits of the
: color byte?

Yes, you'll have to, since the bottom 2 or 3 bits don't matter.
Inspection of the macros will show that the RGB color
values are shifted right 2 or 3 bits.


: How do I get one shade darker or lighter?

Well, for the 5 bit, you'll step through the G values 
in increments of 8-5 = 3 which is 2^3 = 8.  For
the R & B values you'll step through in increments
of 8-6=2, 2^2 = 4.  Try double or triple increments
in the beginning, your monitor might not display the
differences when small, it seems.

Regards,

Greg



: 
: 
: --- Greg Haerr ####@####.#### wrote:
: 
: > : The system I am working on uses TRUECOLOR565. Is
: > there
: > : a good way that I can directly change the RGB
: > values.
: > : MWRGB Produces some strange effects. I am trying
: > to
: > : smoothly shade a bar.
: > 
: > Use the GrOpenClientFramebuffer() api, which will
: > allow
: > you to call GrGetWindowFBInfo to find the
: > memory-mapped
: > address of the current window positions'
: > user-drawable
: > window area.  Then, just draw at that address...
: > 
: > This routine was added for applications that needed
: > fast,
: > direct access to window interiors, like mpeg
: > players.
: > 
: > Regards,
: > 
: > Greg
: > 
: > 
: 
: 
: 
: __________________________________ 
: Yahoo! Mail - PC Magazine Editors' Choice 2005 
: http://mail.yahoo.com
: 
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: ####@####.####
: For additional commands, e-mail: ####@####.####
: 
: 

Previous by date: 30 Sep 2005 21:37:04 +0100 Re: nano-X and alha blending, Jordan Crouse
Next by date: 30 Sep 2005 21:37:04 +0100 Clearing a certain area of a window, tj
Previous in thread: 30 Sep 2005 21:37:04 +0100 Re: TRUECOLOR 565, Jimmy Walker
Next in thread:


Powered by ezmlm-browse 0.20.