| 400 | } |
| 401 | |
| 402 | void vtkOpenGLContextDevice3D::DrawPoints( |
| 403 | const float* verts, int n, const unsigned char* colors, int nc) |
| 404 | { |
| 405 | // build up temporary vtkDataArrays without copying the data. |
| 406 | vtkNew<vtkFloatArray> positionsArray; |
| 407 | vtkNew<vtkUnsignedCharArray> colorsArray; |
| 408 | |
| 409 | positionsArray->SetNumberOfComponents(3); |
| 410 | positionsArray->SetNumberOfTuples(n); |
| 411 | std::copy(verts, verts + n * 3, positionsArray->Begin()); |
| 412 | |
| 413 | if (colors != nullptr) |
| 414 | { |
| 415 | vtkErrorMacro(<< "Here"); |
| 416 | colorsArray->SetNumberOfComponents(nc); |
| 417 | colorsArray->SetNumberOfTuples(n); |
| 418 | std::copy(colors, colors + n * nc, colorsArray->Begin()); |
| 419 | } |
| 420 | |
| 421 | this->DrawPoints(positionsArray, colorsArray, /*cacheIdentifier=*/0); |
| 422 | } |
| 423 | |
| 424 | void vtkOpenGLContextDevice3D::DrawPoints( |
| 425 | vtkDataArray* positions, vtkUnsignedCharArray* colors, std::uintptr_t cacheIdentifier) |
nothing calls this directly
no test coverage detected