C++ - OpenGL - glBufferData with std::vector -
this question has answer here:
- vbos std::vector 2 answers
i want use function glbufferdata fill indices/vertices. have arrays in std::vector , glbufferdata allows char*.
glbufferdata(gl_element_array_buffer, sizeof(m_indicesebo), m_indicesebo, gl_static_draw);
how can use std::vector here?
you can way, assuming m_indicesebo
std::vector.
glbufferdata(gl_element_array_buffer, m_indicesebo.size() * sizeof(<data type>), &m_indicesebo[0], gl_static_draw);
Comments
Post a Comment