Well… Adding BlitBehind is certainly something
debatable. I felt it belonged there because it
reached into some low level SDL stuff… It could
certainly be implimented externally, but It would
probably need to be updated any time the SDL RLE or
alpha blitters change. My intent was to keep this in
SDL so that it could all stay in sync.
As far as “dual alpha channels”, this is already in
SDL… It just doesn’t behave as I believe it should.
The current behavior is it blits as if the dest is
opaque, but retains the dest’s alpha data. I don’t
think that this is the expected behavior
Also, as far as I know, mixing surface alpha with
alpha channel with color-keys seems to not be
disallowed in the API, but I don’t think that the
behaviors are predictable, or at least what is
expected… How SHOULD SDL behave when it’s told to
set the surface alpha on an RGBA surface???
— David Olofson <david.olofson at reologica.se> wrote:
[…]
I’m still working on a patch, but I want to know
how
people expect combinations of the following
operations
to behave. Also I want to hear any comments on
changing the behavior of SDL with regard to these
features and how they act in combination. (I want
to
avoid breaking existing applications ass much as
possible).
Sounds interesting, but I’m a bit worried about
things like “blit behind” and “dual alpha
channels”…
AFAIK, the basic idea with SDL is that it should
just wrap functionality that can be expected to be
hardware accelerated. More specialized stuff that
can only be implemented in software doesn’t belong
in SDL, but should be implemented in libraries on
top of it, or directly in application code.
That said, premultiplied alpha (which enables
blending with alpha channel AND surface alpha) is
accelerated by pretty much every video card these
days. Although glSDL is the only way to get
accelerated alpha blending with the SDL API right
now, the feature is available in DirectX, OpenGL and
some other “new” APIs, so of course, it would
definitely make sense to support it in a future
version of SDL.
I’m interested in implementing it as another data-mode
such as RLE… also interested in being able to
combine it WITH RLE, so you can have an RLE surface
with premultiplied alpha data. If you have any glSDL
code along these lines, I would very much like to see
it…
Either way, the software blitters will always be
needed, for portability, and for covering situations
where existing h/w acceleration can’t be used for
whatever reason.
Hisotrically I think that we’ld find software blitters
have always preceded implementation of the same in
hardware…
//David
Thanks for your comments,
-Loren> On Wed, 19/06/2002 14:05:06 , Loren Osborn <@Loren_Osborn> wrote:
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com