Jump to content
  • Advertisement
Sign in to follow this  
gumpy

sdl performance in windows and linux (solved)

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!