performance - Why is SDL so slow and how can I get it to run faster? -


i have following test setup:

  • 1024 * 768 screen surface created sdl_hwsurface
  • the main loop consists of sdl_flip() , simple fps counter

the problem is:

i getting around 1000 fps this. really low when consider not draw anything!

the fps drop fast when continue on blitting rather large surfaces on screen well.

what wanted do:

a pixel-per-pixel effects/physics destructible terrain/objects game.

  • why sdl slow? (i have played around 3 days small example test , eliminated every possible mistake have made, quite sure sdl's fault)

  • are there secret tricks run faster?

  • are there other 2d apis provide easy , rather fast single-pixel access?

pixel access it's slow in hardware surfaces (it's hardware limit, not sdl limit).

you can try sfml it's opengl accelerated.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -