SFML community forums
Help => Graphics => Topic started by: NGM88 on November 24, 2017, 01:12:42 pm
-
I have been grouping my draw calls so that the vertex arrays and sprites that share the same texture atlas are drawn consecutively without needless texture switches. I noticed that some of my drawables also have textureless sf::shapes in them. Do they cause any sort of state change that would cause a state switch? This might be a stupid question since they don't even have textures, just color, but I would like to know if I should separate the shapes from the group and draw them after the textured drawables?
-
They do involve state switches, yes, because they obviously do not use the same states (no texture).
If your question is how many states, or if they are expensive to change, then it's nearly impossible to say. At this point you'd better make performance tests -- that's what should drive your entire batching design anyway.
-
Thanks Laurent!