------------------------------------------------------------------------------ Call before glDraw* commands to ensure that vertices are properly captured for GL2PS export.
| 165 | // Call before glDraw* commands to ensure that vertices are properly captured |
| 166 | // for GL2PS export. |
| 167 | void 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 |
no test coverage detected