Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::VertexArray pointers. are they possible ?  (Read 1849 times)

0 Members and 1 Guest are viewing this topic.

lori3

  • Newbie
  • *
  • Posts: 4
    • View Profile
sf::VertexArray pointers. are they possible ?
« 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...
Warcraft II HD. Check it out! - https://github.com/lori2001/Warcraft-II---clone

NGM88

  • Full Member
  • ***
  • Posts: 162
    • View Profile
Re: sf::VertexArray pointers. are they possible ?
« Reply #1 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/

lori3

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: sf::VertexArray pointers. are they possible ?
« Reply #2 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
Warcraft II HD. Check it out! - https://github.com/lori2001/Warcraft-II---clone

 

anything