[SDL] Questions about SDL 1.3

ebyard e_byard at yahoo.co.uk
Mon Dec 27 13:11:11 PST 2010

> Wait, what do you mean you can't scale with this? When you draw a rect to the renderer, if you make the width and height of srcRect different from the dimensions of dstRect, it will scale. 

Maybe I'm not explaining myself very well. You're correct in what you say, but my problem is that I draw many individual small rectangles to the renderer, from a large texture, for which you have to supply both the source and destination rectangles. This is fine if you use one fixed window size.

If not, then you'll need to do a load of math on the destination rectangle to get everything scaled correctly - which I haven't figured how to do. Examples are very, very welcome.

I'd like to be able to draw a whole new frame on an intermediate texture (of size, let's say 1024x768), and then pass that texture to the renderer with NULL as the destination rectangle, and so a full screen render on whatever window size I'm using.

Make sense?!?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20101227/64374353/attachment-0008.htm>

More information about the SDL mailing list