Important: Please read the Qt Code of Conduct -

IndexBuffer and vertex size

  • I'm confused about the basics of vbo and ibo.
    I think ibo contains indices to vertices in a vbo.
    In this case how does the ibo "know" the size of each vertex in the vbo?
    E.g. suppose each vertex consists of three floats x, y, z. The vbo contains x, y, and z for each vertex. Now if the ibo references vertices 0, 1 and 2, how do the opengl drawing primitives know that the ibo's reference to vertex 0 starts at byte 0 of the vbo, vertex 1 starts at 3*sizeof(float) in the vbo, and so on?


Log in to reply