Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualBrother Bob

Posted 10 March 2013 - 09:14 AM

If vertices is an object of type std::vector, then &vertices is a pointer to the std::vector object and not the data the std::vector stores. To get the pointer to the data, you need to use &vertices[0], or, if you're on a C++11 compiler, vertices.data(). Same with the color array, of course.


#1Brother Bob

Posted 10 March 2013 - 09:13 AM

If vertices is an object of type std::vector, then &vertices is a pointer to the std::vector object and not the data the std::vector stores. To get the pointer to the data, you need to use &vertices[0], or, if you're on a C++11 compiler, vertices.data().


PARTNERS