[SDL] Re: SDL_SoftStretch
Rainer Deyke
root at rainerdeyke.com
Fri Jun 1 08:23:41 PDT 2001
"Olivier Dagenais" <olivier.dagenais at canada.com> wrote in message
news:9f7uc7$imq$1 at ftp.lokigames.com...
> > Why bother with a separate library for a _simple_ stretch blit ...
> we
>
> Stretching bitmaps is not what I'd expect SDL to do, unless it has a
> way of doing it with hardware.
Almost all hardware supports this.
> > have a working function in SDL. Why it isn't recommended - I don't
> know?
>
> Because it uses inline assembler, it is not thread-safe.
How is inline assembler any less thread safe than straight C? Anyway, just
wrap the function in another function which performs the necessary locking
to ensure thread safety.
> Also, it
> does not do any smoothing. On top of it all, Mattias warns that it
> may disappear or change without notice, mostly because it is not an
> exposed function.
I think the proposal was to add 'SDL_SoftStretch' or something similar to
the official API, which would remove that problem.
Of course, what we really want is a function that is semantically identical
to 'SDL_BlitSurface' (including support for alpha and color key) except that
scaling is performed to map the source rectangle onto the destination
rectangle. Writing such a function with good performance characteristics is
very difficult, which I expect is the real reason no such function exists in
SDL right now.
--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
More information about the SDL
mailing list