sdl performance in windows and linux (solved)

Started by
2 comments, last by gumpy 18 years, 10 months ago
i just started learning sdl and wrote a simple app to test under both linux and windows xp. i compiled it using gcc in linux and mingw32 in windows. both were compiled in debug mode with no optimizations and identical source. the app simply creates a 640x480 window and blits a 256x256 image at a random position each frame for a few seconds, then gives the average framerate. under linux i get about 35fps, but under windows i get about 60fps (vsync i bet). my question is what could cause such a drastic difference between the two? [Edited by - gumpy macdrunken on June 17, 2005 5:49:52 AM]
This space for rent.
Advertisement
My guess is that SDL uses one rendering API under Windows (DirectDraw?) and another under Linux, therefore the difference in performance.

Another thing might be that the Linux graphics drivers aren't as optimized as the Windows ones.
Quote:Original post by storage
My guess is that SDL uses one rendering API under Windows (DirectDraw?) and another under Linux, therefore the difference in performance.

Another thing might be that the Linux graphics drivers aren't as optimized as the Windows ones.

Actually it's been my experience that 99% of the people I know that actually run linux aren't running it with 3d acceleration enabled!
And if they don't have an nvidia card it's almost guaranteed!


[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Quote:Original post by storage
My guess is that SDL uses one rendering API under Windows (DirectDraw?) and another under Linux, therefore the difference in performance.

Another thing might be that the Linux graphics drivers aren't as optimized as the Windows ones.


i was beginning to think the same thing but i just solved it. i wasn't calling SDL_DisplayFormat() on my image. the image and my windows display are both 32bit, but apparently i'm using 16 or 24bit in linux.
This space for rent.

This topic is closed to new replies.

Advertisement