I have a question regarding OpenGL glBufferData() method.Can I pass the vertex data in structures like std::vector ,std::list or it must be a classic ( [] )array of numbers?
I have a question regarding OpenGL glBufferData() method.Can I pass the vertex data in
Share
You have to pass a classic array to glBufferData() (the OpenGL API is defined in C). However, you can use std::vector<> by converting it to an array with
&v[0](also see Converting between C++ std::vector and C array without copying).