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

Function PreDraw

Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx:167–178  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Call before glDraw* commands to ensure that vertices are properly captured for GL2PS export.

Source from the content-addressed store, hash-verified

165// Call before glDraw* commands to ensure that vertices are properly captured
166// for GL2PS export.
167void PreDraw(vtkOpenGLHelper& helper, int drawMode, size_t numVerts)
168{
169 vtkOpenGLGL2PSHelper* gl2ps = vtkOpenGLGL2PSHelper::GetInstance();
170 if (gl2ps && gl2ps->GetActiveState() == vtkOpenGLGL2PSHelper::Capture && helper.Program)
171 {
172 if (vtkTransformFeedback* tfc = helper.Program->GetTransformFeedback())
173 {
174 tfc->SetNumberOfVertices(drawMode, numVerts);
175 tfc->BindBuffer();
176 }
177 }
178}
179
180//------------------------------------------------------------------------------
181// Call after glDraw* commands to ensure that vertices are properly captured

Callers 4

DrawPolyMethod · 0.85
DrawLinesMethod · 0.85
DrawPointsMethod · 0.85
CoreDrawTrianglesMethod · 0.85

Calls 2

BindBufferMethod · 0.80
SetNumberOfVerticesMethod · 0.45

Tested by

no test coverage detected