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

Author Topic: drawing std::map of vertices  (Read 1622 times)

0 Members and 1 Guest are viewing this topic.

phufhi

  • Newbie
  • *
  • Posts: 8
    • View Profile
drawing std::map of vertices
« on: October 23, 2012, 09:26:49 pm »
Is there any way to directly draw an std::map of vertexes with sf::RenderWindow?

By using a map instead of an array it's easier to adjust changing vertices.
This is because the positions of the vertices within the map are not dependent on when the vertices were added or changed.
The alternative would be to create a new vertex array every time a vertex changes.

I'm using SFML 2 by the way.

Thanks!

PS. If it's currently not possible, but not too hard to implement, please view this as a feature request  :)

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: drawing std::map of vertices
« Reply #1 on: October 23, 2012, 09:39:26 pm »
Impossible, vertices must be in contiguous memory space.
Back to C++ gamedev with SFML in May 2023

phufhi

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: drawing std::map of vertices
« Reply #2 on: October 23, 2012, 09:43:23 pm »
Thanks, I'll probably use the alternative option then  ;)

 

anything