On Mon, Dec 15, 2008 at 10:20 AM, Alex_Gaynor <[email protected]> wrote: > > Ah thanks, that makes sense, although it would be nice if it were > documented(I suppose this is considered obvious to people who actually > work with OpenGL :) ). I think the most sensible place to call this > would be in my Polygon.draw method. > > I have an additional question about how exactly the alpha channel > works. Right now I have the color mode set to "c4B", which I think > means I provide 4 values(Red, green, blue, alpha), I'm trying to do > generate something similar to the partially transparent A over B as > seen here: > http://upload.wikimedia.org/wikipedia/commons/2/2a/Alpha_compositing.svg > . With the end result being something like what's seen at > http://alteredqualia.com/visualization/evolve/ . a) Is my > understanding of c4B correct, and what value for the alpha compoment > makes sense?
Yes, however you also need to explicitly enable blending: glEnable(GL_BLEND) You can change the blend function from the default (SRC_OVER) with glBlendFunc. Not all of the blend functions in that wikipedia image are supported by OpenGL. 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 -~----------~----~----~----~------~----~------~--~---
