SFML community forums

Help => Graphics => Topic started by: phufhi on October 23, 2012, 09:26:49 pm

Title: drawing std::map of vertices
Post by: phufhi 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  :)
Title: Re: drawing std::map of vertices
Post by: FRex on October 23, 2012, 09:39:26 pm
Impossible, vertices must be in contiguous memory space.
Title: Re: drawing std::map of vertices
Post by: phufhi on October 23, 2012, 09:43:23 pm
Thanks, I'll probably use the alternative option then  ;)