[SDL] Surface vs Texture - optimal usage
mattreecebentley at gmail.com
Sun Oct 20 15:28:00 PDT 2013
> The issue isn't speed (SDL is plenty fast), it's functionality.
> You're fine if you want to make something like this:
> http://static.giantbomb.com/uploads/original/15/158896/2211248-2011_12_25_00005.jpg (http://static.giantbomb.com/uploads/original/15/158896/2211248-2011_12_25_00005.jpg)
> If you're doing complex rendering with dynamic effects like:
> http://www.youtube.com/watch?v=2mx84JhzMUo (http://www.youtube.com/watch?v=2mx84JhzMUo)
> ...then you probably want to use opengl or manually manage pixel buffers.
> It's up to you; but binding lots of textures and batch calling RenderCopyEx isn't a solution for anything other than prototyping.
Just stumbled upon this article: http://www.learn-cocos2d.com/2011/09/cocos2d-spritebatch-performance-test/
Which suggests that sprite-batching for small textures is negligibly more performant, but for large textures makes a huge difference.
Is it possible to do sprite-batching under SDL?
Also, I'm a little confused, why would making multiple copies from the same texture be more performant than multiple copies from multiple textures? Surely if they're all in hardware memory at the same time it shouldn't make a difference?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL