Go to the documentation of this file.
66 #ifndef vtkOpenGLInstanceCulling_h
67 #define vtkOpenGLInstanceCulling_h
71 #include "vtkRenderingOpenGL2Module.h"
99 return this->Distance < other.
Distance;
115 void AddLOD(
float distance,
float targetReduction);
154 vtkSetMacro(ColorLOD,
bool);
155 vtkGetMacro(ColorLOD,
bool);
170 std::vector<InstanceLOD> LODList;
172 bool ColorLOD =
false;
175 #endif // vtkOpenGLInstanceCulling_h
vtkOpenGLInstanceCulling()=default
void RunCullingShaders(vtkIdType numInstances, vtkOpenGLBufferObject *matrixBuffer, vtkOpenGLBufferObject *colorBuffer, vtkOpenGLBufferObject *normalBuffer)
Run the culling program and generate LOD buffers.
vtkIdType GetNumberOfLOD()
Get number of LOD currently declared.
void AddLOD(float distance, float targetReduction)
Add a level of detail.
abstract base class for most VTK objects
InstanceLOD & GetLOD(vtkIdType index)
Get LOD structure.
VTKCOMMONCORE_EXPORT bool operator<(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
vtkOpenGLBufferObject * NormalVBO
vtkOpenGLBufferObject * GetLODBuffer(vtkIdType index)
Get the transform feedback buffer generated by the culling program.
OpenGL vertex buffer object.
~vtkOpenGLInstanceCulling() override
Frustum culling and LOD management.
void BuildCullingShaders(vtkOpenGLShaderCache *cache, vtkIdType numInstances, bool withNormals)
Build culling shader program (if not created yet) and binds it.
static vtkOpenGLInstanceCulling * New()
manage Shader Programs within a context
vtkOpenGLBufferObject * PositionVBO
void InitLOD(vtkPolyData *pd)
Initialize LOD with a polydata.
vtkOpenGLIndexBufferObject * IBO
concrete dataset represents vertices, lines, polygons, and triangle strips
void UploadCurrentState(InstanceLOD &lod, vtkPolyData *pd)
vtkOpenGLHelper & GetHelper()
Get helper structure.