SFML community forums

Help => Graphics => Topic started by: lori3 on June 17, 2018, 02:26:38 pm

Title: sf::VertexArray pointers. are they possible ?
Post 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...
Title: Re: sf::VertexArray pointers. are they possible ?
Post by: NGM88 on June 18, 2018, 07:41:49 pm
Refer to the offical tutorial to learn how to use sf::VertexArray.

https://www.sfml-dev.org/tutorials/2.5/
Title: Re: sf::VertexArray pointers. are they possible ?
Post by: lori3 on June 18, 2018, 10:42:30 pm
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:
Quote
(*example)[0].position