Using VBO to draw line string
问题 I am able to render the below points using the VBO and shaders in OpenGL 4.x. typedef struct Point { double x,y,z,w; }Point; std::vector<Point>vPoints; glBufferData(GL_ARRAY_BUFFER, vPoints.size()* sizeof(Point), &vPoints[0], GL_STATIC_DRAW); glVertexAttribPointer(0, 4, GL_DOUBLE, GL_FALSE, vPoints.size()*sizeof(GLdouble), (GLvoid*)0) How do we specify VBO to draw a line string using below variables typedef struct LineString { vector<Point> vPointList; }LineString; vector<LineString> vLines;