MCPcopy Create free account
hub / github.com/Kitware/VTK / DrawPoints

Method DrawPoints

Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx:988–1006  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

986
987//------------------------------------------------------------------------------
988void 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//------------------------------------------------------------------------------
1009void vtkOpenGLContextDevice2D::DrawPoints(

Callers

nothing calls this directly

Calls 15

ReadyVCBOProgramMethod · 0.95
ReadyVBOProgramMethod · 0.95
SetPointSizeMethod · 0.95
SetMatricesMethod · 0.95
SkipDrawFunction · 0.85
PreDrawFunction · 0.85
PostDrawFunction · 0.85
GetAlphaMethod · 0.80
SetNumberOfComponentsMethod · 0.45
SetArrayMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetColorObjectMethod · 0.45

Tested by

no test coverage detected