I’m a little confused about setting the right data when mapping a buffer.
if I have a vertex structure:
struct custom_vertex
{
vector3 position;
vector3 normal;
};
when I go to get a pointer to the vbo using glMapBuffer it should be:
custom_vertex * buffer_ptr = (custom_vertex*)glmapbuffer(GL_ARRAY_BUFFER, GL_WRITE);
and I should be able to change the value in that buffer like so:
buffer_ptr[0].position = vector3(5.0, 0.0, -1.0);
right?