Scaling routines

Hello fellow SDL users/developers,

this question was possibly anwsered many times but since I don’t have access to the
internet (ie : webbrowser) I hope people can anwser this by e-mail.

Currently I have a buffer which is a SDL_Surface, I can nicely draw this to the screen. At
the moment I use the putpixel and getpixel “examples” from the SDL website to scale (upto
sizes of 4 times of the buffer surface) the buffer surface and display it (directly) to my
primary display surface. This works but it’s definately NOT fast (even on fast machines)
since the calculations in the for loops are time consuming.

I think it’s better and faster to use alternate code for scaling the buffer surface and
blitting it directly to my primary display surface. Does anybody have examples (preferable
with source) to do this and perhaps using MMX?

I hope people can help me with this question :slight_smile:

Regards,

Niels
Wagenaar

there is gpl code out there that was mentioned on sdl-devel a few months
ago to do advanced scaling w/ optional mmx acceleration. you mentioned
not having access to the internet, so … i dunno, you want the source
code for it privately emailed to you?On Wed, 2003-02-12 at 02:46, Niels Wagenaar wrote:

Hello fellow SDL users/developers,

this question was possibly anwsered many times but since I don’t have access to the
internet (ie : webbrowser) I hope people can anwser this by e-mail.

Currently I have a buffer which is a SDL_Surface, I can nicely draw this to the screen. At
the moment I use the putpixel and getpixel “examples” from the SDL website to scale (upto
sizes of 4 times of the buffer surface) the buffer surface and display it (directly) to my
primary display surface. This works but it’s definately NOT fast (even on fast machines)
since the calculations in the for loops are time consuming.

I think it’s better and faster to use alternate code for scaling the buffer surface and
blitting it directly to my primary display surface. Does anybody have examples (preferable
with source) to do this and perhaps using MMX?

I hope people can help me with this question :slight_smile:

Regards,

Niels
Wagenaar


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Chris Thielen <@Christopher_Thielen>