SDL 1.3 streaming texture help!

Hi Folks

Upto now I have been rendering stuff, manually scaling it by adjusting the destination w & h, but this leaves small 1 pixel artifacts around sometimes, due to rounding of the source x and y co-ordinates.

So, the way to fix this is to use another texture, the size of the base resolution (eg 1024x768) which gets everything rendered to it, then draw that texture to the size of the window (eg 1280x1024). Problem is, I don’t know how!!

Does anyone have advice they can share? I have to finish this project very soon :frowning:

Cheers
Ed

Hmm I kind of realised that this isn’t going to work unless I can render to an intermediate texture - something which I think is currently impossible under SDL 1.3.

I don’t think I can easily keep a track of a list of rectangles which have changed, as there are so many!

Just use a bounding box for all rectangles. Grow the box whenever a
drawn rectangle extends outside the box, then update everything within
the box and reset to an empty box.

This way, you may end up updating more than you need to, but you don’t
update any point more than once per cycle, and it is (or should be)
better than updating the entire screen.On 11 February 2011 13:30, ebyard <e_byard at yahoo.co.uk> wrote:

Hmm I kind of realised that this isn’t going to work unless I can render to
an intermediate texture - something which I think is currently impossible
under SDL 1.3.

I don’t think I can easily keep a track of a list of rectangles which have
changed, as there are so many!