Page 1 of 1

Blitting surfaces at 1000x1000

PostPosted: Thu May 27, 2010 1:51 am
by Groogy
Hi! Got a little problem here.

I have a surface that's 5000x1000 in size but it is divided into 5 clips(1000x1000 each) and when I try to blit them the framerate drops from 50 to around 9-10. I thought that SDL clipped the images by itself for you? Or do I have to calculate what area to paint myself?

I know it is the blitting that slows it down to that framerate since when I remove the blit statement of that surface it goes back up to 50 FPS.

Code commented away to get back to 50 FPS:
Code: Select all
surface.blit(@screen, coords, src_rect)


What I'm trying to paint is a sectors(I divide a huge map into sectors and only render the ones in view) terrain image. The different clips are the layers/levels/z of the sector which are rendered by: y -= layer * 32

Anything else you need to know just ask. That framerate drop is too painful

**EDIT**
Played around a little more and when I moved the camera so it looked at the coordinates 900x900 so that it didn't show all the other layers, it went up to 50 in FPS