[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] SDL vs. Pygame: Alpha Differences



René Dudfield wrote:
Hi,

maybe I could put in a new blit mode for you before this release... if
it can't be done already.

Can you describe what you want?  I'm still not clear on it.

Do you want this?
DR, DG, DB, DA = SR, SG, SB, DA



Well, after studying Brian's code carefully and trying various techniques with my sprite engine, I have come to realize Brian's comment is true - there is no pleasing me. :-D His method works, as fast as any alternate method I have come up with, but the problem is it's still not fast enough.


It would still be nice to have the following, but it wouldn't solve my nighttime speed problem: Blit from source RGBA to dest RGBA would blend the source RGB onto the dest RGB using the src alpha, leaving the dest alpha untouched.

The problem is this: Let's say the above worked. I still have to compose the desired sprites into a temporary buffer, apply the night with the special blit, then blit them out of that temporary buffer onto the final buffer. Those two extra blits are killing the speed.

That special blit would still be nice, but it's not a showstopper, because there's several methods around it, including Brian's and a couple of others I've used.

It's basically my problem, sorry for bothering you guys with it, and good luck with the release! Is there any documentation on the what the special_flags on the blit do?

--Kamilche