SFML community forums
Help => Graphics => Topic started by: ILostMyAccount on February 17, 2015, 11:11:58 am
-
Can someone explain me what exactly is the sprite batching?
And can you link me an example of code in SFML?
Thank you.
-
How about you use the search function to find it yourself?
Because that's exactly what I now have to do, just so you don't have to do it....
-
I'd like an answer for this too. I assumed that having a single spritesheet with all the sprites for different objects would be fine, and I could just draw each thing individually, and since it uses the same spritesheet (albeit with different coordinates for the intrect), it would be fine.
Apparently that's not the case.
Also, I used the search function and could not find another topic for this.
-
In short: Sprite Batching is a way to draw lots of things all in one draw call. All those things must come from the same texture.
Here's how I came up with my own way to do sprite batching:
https://github.com/dabbertorres/SwiftSpriteBatch
It uses a sf::VertexArray to draw everything.