SFML community forums
Help => Graphics => Topic started by: lori3 on June 17, 2018, 02:26:38 pm
-
Hey.. I am trying to make an rts game.. and i have noticed that my performance is very bad...
For the last 2 weeks or so i remade the entire menu i just made with dynamic allocation however whenever i get to an entity which has a vertexarray ( the tilemap for example) i realise that i can't allocate memory dinamically to that because if i make it a pointer i cant set its position and texture coords.. is there any way to bypass that or something? pls help...
-
Refer to the offical tutorial to learn how to use sf::VertexArray.
https://www.sfml-dev.org/tutorials/2.5/
-
I found the answer. I just seem to have forgotten how to use pointers :'(. For those seeking help in the same topic the answer is:
(*example)[0].position