can you tell a bit more about the "blending equations" ? I have no idea where to look for that and how I can use it to solve my problem. thanks
On Mar 3, 4:58 pm, Tristam MacDonald <[email protected]> wrote: > On Wed, Mar 3, 2010 at 10:54 AM, Philippe <[email protected]> wrote: > > I understood something. > > If I have 2 sprites: > > 1- background.png (all red, no alpha) > > 2- foreground.png (all green, 50% alpha) > > > pyglet will display them perfectly. > > but, doing a screenshot with color_buffer, it will be wrong. > > It will produce a RGBA file. there will be the 50% alpha on the > > foreground, but it will add 50% alpha on the background too ! > > That is correct - your screenshot just takes a copy of the backbuffer, > complete with alpha channel. > > The alpha channel of the backbuffer contains the result of the blend, and if > you don't setup your blending equations very carefully with screenshots in > mind, that will just be the alpha value of the last fragment written (in > your case, the 50% from the sprite). > > -- > Tristam MacDonaldhttp://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.
