On Wed, Mar 26, 2008 at 7:50 PM, Alex Holkner <[EMAIL PROTECTED]> wrote: > > The graphics module, like OpenGL, allows colors to be set with any > data type (0-1, 0-255, 0-65536, etc, ..). Internally, all current > video drivers use the 0-255 range. To convert to this from a Python > 0-1 float requires first a double->float conversion (by ctypes, as > Python uses doubles internally), followed by a float->int > scale+conversion (by the video driver). > > Seeing as the choice to use 0-1 seemed fairly arbitrary to me (only > glClearColor enforces it in OpenGL, from memory), the text and sprite > modules (which use pyglet.graphics for rendering) were designed to use > the most efficient format. My benchmarks showed that there was a > small but measurable difference. >
mmh. thanks. i really should read the colored books. lucio. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
