66#ifndef vtkOpenGLInstanceCulling_h
67#define vtkOpenGLInstanceCulling_h
71#include "vtkRenderingOpenGL2Module.h"
113 void AddLOD(
float distance,
float targetReduction);
150 vtkSetMacro(ColorLOD,
bool);
151 vtkGetMacro(ColorLOD,
bool);
166 std::vector<InstanceLOD> LODList;
168 bool ColorLOD =
false;
a simple class to control print indentation
abstract base class for most VTK objects
OpenGL vertex buffer object.
Frustum culling and LOD management.
InstanceLOD & GetLOD(vtkIdType index)
Get LOD structure.
static vtkOpenGLInstanceCulling * New()
~vtkOpenGLInstanceCulling() override
void AddLOD(float distance, float targetReduction)
Add a level of detail.
void BuildCullingShaders(vtkOpenGLShaderCache *cache, vtkIdType numInstances, bool withNormals)
Build culling shader program (if not created yet) and binds it.
vtkOpenGLHelper & GetHelper()
Get helper structure.
void InitLOD(vtkPolyData *pd)
Initialize LOD with a polydata.
vtkIdType GetNumberOfLOD()
Get number of LOD currently declared.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RunCullingShaders(vtkIdType numInstances, vtkOpenGLBufferObject *matrixBuffer, vtkOpenGLBufferObject *colorBuffer, vtkOpenGLBufferObject *normalBuffer)
Run the culling program and generate LOD buffers.
vtkOpenGLBufferObject * GetLODBuffer(vtkIdType index)
Get the transform feedback buffer generated by the culling program.
void UploadCurrentState(InstanceLOD &lod, vtkPolyData *pd)
vtkOpenGLInstanceCulling()=default
manage Shader Programs within a context
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
bool operator<(const InstanceLOD &other) const
vtkOpenGLBufferObject * PositionVBO
vtkOpenGLBufferObject * NormalVBO
vtkOpenGLIndexBufferObject * IBO