I’ve got a VBO, a vector containing vertex data as a list of floats, and a vector containing index data as a list of ints.
std::vector<float> vertices;
std::vector<int> edges;
With the ofVbo class, this works:
vbo.setVertexData(&vertices[0], 3, vertices.size(), GL_STATIC_DRAW, 0);
However, this gives me an error:
vbo.setIndexData(&edges[0], edges.size(), GL_STATIC_DRAW);
Error C2664 'void ofVbo::setIndexData(const ofIndexType *,int,int)': cannot convert argument 1 from '_Ty *' to 'const ofIndexType *'
Error (active) E0167 argument of type "GLint *" is incompatible with parameter of type "const ofIndexType *
I’ve tried changing the type of edges
from int
to UINT16
, short
and ushort
and so on, but I can’t see how to get from int
to ofIndexType
, even though presumably indices need to be an unsigned integer.
Thanks in advance!