On Thu, Mar 26, 2009 at 1:42 AM, Casey Duncan <[email protected]>wrote:

>
> On Wed, Mar 25, 2009 at 6:18 PM, Bruce Smith <[email protected]> wrote:
> >
> > On Mar 25, 7:49 am, Matthew Marshall <[email protected]>
> > wrote:
> >> All colors in rabbyt (and pyglet) are in the range 0..1.  That's how
> >> they are with OpenGL.  You get used to it pretty quick :-)
> >
> > Actually, some pyglet colors are from 0..1 and others are from 0..255,
> > depending on the API -- for example:
>
> The statement "that's how they are in OpenGL" isn't the whole truth.
> In fact OpenGL lets you specify color values as bytes, short ints,
> long ints or floats. The most popular of those options is bytes and
> floats. The former for vertex lists because they are compact and the
> latter for immediate mode. Though you can in fact use any
> representation you choose for either.
>

Internally, however (and you can see this if you write shaders) OpenGL
always treats colours as floats.

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to