[SDL] Surface vs Texture - optimal usage

Martin Gerhardy martin.gerhardy at gmail.com
Sun Oct 20 22:50:30 PDT 2013


it is possible. you can specify the texture source rects for the render calls. that should be all you need.



Am 21.10.2013 um 00:28 schrieb "mattbentley" <mattreecebentley at gmail.com>:

> 
> 
> 
> 
> 
> 
> 
> Doug wrote:
> 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
> 
> 
> If you're doing complex rendering with dynamic effects like:
> 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?
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20131021/bbdb7b08/attachment-0009.htm>


More information about the SDL mailing list