VTK  9.4.20241031
vtkOpenGLLowMemoryCellTypeAgent.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
9#ifndef vtkOpenGLLowMemoryCellTypeAgent_h
10#define vtkOpenGLLowMemoryCellTypeAgent_h
11
14#include "vtkRenderingOpenGL2Module.h"
15
16VTK_ABI_NAMESPACE_BEGIN
17class vtkActor;
18class vtkRenderer;
19
20class VTKRENDERINGOPENGL2_NO_EXPORT vtkOpenGLLowMemoryCellTypeAgent
21{
22public:
25
26 void PreDraw(
27 vtkRenderer* renderer, vtkActor* actor, vtkOpenGLLowMemoryPolyDataMapper* mapper) const;
29 const std::vector<vtkOpenGLLowMemoryPolyDataMapper::CellGroupInformation>& cellGroups,
30 std::size_t cellGroupIdx = 0) const;
32 vtkRenderer* renderer, vtkActor* actor, vtkOpenGLLowMemoryPolyDataMapper* mapper) const;
33
34 virtual bool ImplementsVertexVisibilityPass() const = 0;
35 inline void BeginVertexVisibilityPass() { this->InVertexVisibilityPass = true; }
36 inline void EndVertexVisibilityPass() { this->InVertexVisibilityPass = false; }
37
38protected:
39 virtual void PreDrawInternal(
40 vtkRenderer* renderer, vtkActor* actor, vtkOpenGLLowMemoryPolyDataMapper* lmMapper) const = 0;
41 virtual void PostDrawInternal(
42 vtkRenderer* renderer, vtkActor* actor, vtkOpenGLLowMemoryPolyDataMapper* lmMapper) const = 0;
43
44 int NumberOfPointsPerPrimitive = 1;
45 bool InVertexVisibilityPass = false;
46};
47
48VTK_ABI_NAMESPACE_END
49#endif
50
51// Need to skip header testing since we do not inherit vtkObject:
52// VTK-HeaderTest-Exclude: vtkOpenGLLowMemoryCellTypeAgent.h
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
Helps vtkOpenGLLowMemoryPolyDataMapper map and draw cell types from vtkPolyData as OpenGL graphics pr...
void PostDraw(vtkRenderer *renderer, vtkActor *actor, vtkOpenGLLowMemoryPolyDataMapper *mapper) const
virtual void PostDrawInternal(vtkRenderer *renderer, vtkActor *actor, vtkOpenGLLowMemoryPolyDataMapper *lmMapper) const =0
void PreDraw(vtkRenderer *renderer, vtkActor *actor, vtkOpenGLLowMemoryPolyDataMapper *mapper) const
virtual bool ImplementsVertexVisibilityPass() const =0
void Draw(vtkRenderer *renderer, vtkActor *actor, vtkOpenGLLowMemoryPolyDataMapper *mapper, const std::vector< vtkOpenGLLowMemoryPolyDataMapper::CellGroupInformation > &cellGroups, std::size_t cellGroupIdx=0) const
virtual void PreDrawInternal(vtkRenderer *renderer, vtkActor *actor, vtkOpenGLLowMemoryPolyDataMapper *lmMapper) const =0
PolyDataMapper using OpenGL to render surface meshes.
abstract specification for renderers