Hello, I'm trying to figure out how I can create a vertex array object at offset of a vertex buffer object. I honestly have no idea how to do this at all. I've created the buffer object. I'd like the "texs" idnex data to start at the texture coordinate content of the vertex_t structure.
Type definitions:
1 2 3 4 5 6
struct vertex_t
{
vector3d_t position;
float s; // Texture coordinate s
float t; // Texture coordinate t
};
Code so far:
1 2 3 4
// How do I make this start at a certain spot of the VBO?!
glVertexAttribPointer(texs, 2, GL_FLOAT, GL_FALSE, sizeof(vector3d_t), nullptr;
//...