On 12/15/08, Alex_Gaynor <[email protected]> wrote:
>
>  I have this code: http://dpaste.com/99080/ which is meant to be a
>  wrapper around drawing polygons.  When I run this code I get the left
>  side of screen with the image tinted red, and the right side as just
>  red.  What I would expect is the left side to just be the image, and
>  the right side to be red.  I'm not sure what I'm doing incorrectly.
>  Any assistance you can provide would be great.

The current color state is undefined after drawing a polygon
(according to OpenGL) -- in your case you're finding that it's being
set to red, the last vertex color used.  pyglet's 'blit' method makes
no assumptions about the current color, and assumes you've set it
yourself correctly.

Call glColor3f(1, 1, 1) before calling blit to get the image without
tint (white vertices).  Alternatively, use a Sprite instead of blit,
which sets its own vertex colors.

Alex.

--~--~---------~--~----~------------~-------~--~----~
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