------------------------------------------------------------------------------
| 986 | |
| 987 | //------------------------------------------------------------------------------ |
| 988 | void vtkOpenGLContextDevice2D::DrawPoints(float* f, int n, unsigned char* c, int nc) |
| 989 | { |
| 990 | // build up temporary vtkDataArrays without copying the data. |
| 991 | vtkNew<vtkFloatArray> positionsArray; |
| 992 | vtkNew<vtkUnsignedCharArray> colorsArray; |
| 993 | vtkNew<vtkFloatArray> tcoordsArray; |
| 994 | |
| 995 | positionsArray->SetNumberOfComponents(2); |
| 996 | positionsArray->SetArray(f, n * 2, 1); // do not take ownership of 'points' |
| 997 | |
| 998 | if (c != nullptr) |
| 999 | { |
| 1000 | colorsArray->SetNumberOfComponents(nc); |
| 1001 | colorsArray->SetArray(c, n * nc, 1); // do not take ownership of 'colors' |
| 1002 | } |
| 1003 | |
| 1004 | // use 'anonymous' cache identifier because of raw typed array pointers. |
| 1005 | this->DrawPoints(positionsArray, colorsArray, /*cacheIdentifier=*/0); |
| 1006 | } |
| 1007 | |
| 1008 | //------------------------------------------------------------------------------ |
| 1009 | void vtkOpenGLContextDevice2D::DrawPoints( |
nothing calls this directly
no test coverage detected