SFML community forums
Help => Graphics => Topic started by: tomvidm on July 17, 2018, 01:59:02 pm
-
As I understand, when calling draw with a transform in the RenderStates structure, the transform is applied on the GPU. Is this true?
I want to benchmark the point where large number of draw calls breaks even with a large number of transforms applied on individual vertices of a VertexBuffer with a single draw call. Knowing where the transform is performed will help me understand what is going on.
-
Yes, transforms are usually always applied on the GPU. The only case where they are applied on the CPU is a questionable optimization hidden in SFML (https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/RenderTarget.cpp#L265-L277).
I want to benchmark the point where large number of draw calls breaks even with a large number of transforms applied on individual vertices of a VertexBuffer with a single draw call.
What does "break" mean, and how do you know it has anything to do with transforms?
-
Thanks for the answer.
I explained myself poorly. Considering that the draw call itself is a relatively slow operation for sprites, I want to implement sprites using the VertexBuffer class, to measure the difference between:
N draw call for individual sprites with transforms being left as work for the GPU
At most 4*N transforms on the CPU and one draw call
I am disregarding culling of any kind here. I just want to make a comparison between the two cases
-
N draw call for individual sprites with transforms being left as work for the GPU
These transforms will probably happen on the CPU because of the optimization I mentioned above.
-
Thank you for pointing the way and clearing up a misconception I had.