SDL - Too slow
Hi guys, I've a problem I working with the SDL under linux and under windows too, and the HWSURFACE are not supported (I've a ATI Radeon Mobility 9000 IGP). So the fps is very slow (24 fps). I've 3 surfaces. Screen -> 640x480x32 Tiles -> 320x128x24 VirtualScreen -> 1280x1024x24 (where I draw my world) All the surface are passed through the SDL_DisplayFormat(tiles); I use SDL_Flip to draw the scene... Where I wrong? Is better use another libraries?
Try it without SDL_DisplayFormat. What are you doing that makes it slow?
Make sure everything is display formatted into 32bpp. Make sure your FPS counter works right.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
Quote:
Original post by NighTiger
Screen -> 640x480x32
Tiles -> 320x128x24
VirtualScreen -> 1280x1024x24 (where I draw my world)
Wait, are you drawing the entire 1280 x 1024 surface or just a portion of it everytime? So my question is how are you blitting that surface to the screen?
Are you passing everything through SDL_DisplayFormat for *every* frame? That's gonna be *sllooooooowww*. Always make sure that all your surfaces have the exact same format (the format of the video surface). If needed, convert them *once*, in the init part of your program.
Quote:
Original post by Anonymous Poster
If you're already doing this, then never mind.
okkey... never mind because I just doing this :°°°°(
Quote:
Original post by Kylotan
What do you need the virtual screen for anyway?
I use my VS for make a map with tiles
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement