I have a list of QVector3D
, which is a list of points, I want to draw a list of points with glDrawArrays
.
initializeGLFunctions();
glGenBuffers(2, vbo);
//the vertices
QVector3D *vertices = &data[0];
glBindBuffer(GL_ARRAY_BUFFER, vbo[0]);
glBufferData(GL_ARRAY_BUFFER, data.size() * sizeof(QVector3D), vertices, GL_STATIC_DRAW);
glDrawArrays(GL_POINTS,??);
or what other method I can use to deal with this?