Hi,
im using the new vertexarray introduced in SFML2 to batch all the tiles from my tile map.
I add all the quads to the vertex array and set the texture coordinates accordingly.
This works good.
I can rotate the tiles in steps of 90°, or mirror them by swapping the texture coordinates.
But how can I rotate the image by an arbitrary value ? For example 15°
Do I have to rotate my vertices by the required value myself ?
Applying a series of trigonometric functions to every vertex doesnt seem to be the correct way, because its relatively expensive to do those calculations every frame.
Can I somehow utilize the GPU to do that work for me ?
If so, how ?
I know I can use Sprite and set its Rotation to the desired value, but will using "Sprite" still make use of batching ?? I think not, but correct me if I'm wrong