used to create an IBO for primitives as lines. This method treats each line segment as independent. So for a triangle mesh you would get 6 verts per triangle 3 edges * 2 verts each. With a line loop you only get 3 verts so half the storage. but... line loops are slower than line segments.
| 330 | // 3 edges * 2 verts each. With a line loop you only get 3 verts so half the storage. |
| 331 | // but... line loops are slower than line segments. |
| 332 | size_t vtkOpenGLIndexBufferObject::CreateTriangleLineIndexBuffer(vtkCellArray* cells) |
| 333 | { |
| 334 | if (!cells->GetNumberOfCells()) |
| 335 | { |
| 336 | this->IndexCount = 0; |
| 337 | return 0; |
| 338 | } |
| 339 | std::vector<unsigned int> indexArray; |
| 340 | AppendTriangleLineIndexBuffer(indexArray, cells, 0); |
| 341 | this->Upload(indexArray, vtkOpenGLIndexBufferObject::ElementArrayBuffer); |
| 342 | this->IndexCount = indexArray.size(); |
| 343 | return indexArray.size(); |
| 344 | } |
| 345 | |
| 346 | // used to create an IBO for primitives as lines. This method treats each |
| 347 | // line segment as independent. So for a line strip you would get multiple |
no test coverage detected