21 #include <osg/Drawable>
22 #include <osg/Uniform>
24 #include <boost/unordered_map.hpp>
25 #include <tbb/atomic.h>
26 #include <tbb/concurrent_queue.h>
30 #define INDIRECTGEOMETRY_CONSTRUCT_DESTRUCT_DEBUG 0
45 class DtIndirectGeometryRegistrar;
46 class DtGpuCullingAndLod;
48 class DtOsgShaderFilesCache;
70 void insertMode(
int index,
bool enable,
int mode);
73 void applyMode(
int index)
const;
76 void restoreAllModes(osg::State &state)
const;
79 int numberOfStates()
const;
104 CullFaceOffState = 1,
137 virtual void drawImplementation(osg::RenderInfo& renderInfo)
const;
143 virtual void removeAllInstances(
void);
148 virtual void accept(osg::NodeVisitor& nv);
151 virtual void setParent(
const osg::Group* parent);
156 virtual void setDebugDrawString(
const std::string& drawString);
163 virtual void setRegistrarInvalid(
void);
165 virtual void releaseGLObjects(osg::State* state)
const;
178 virtual void addInstanceActual(
const DtInstance_64& instance);
179 virtual bool actuallyAddQueuedUpInstances(
void);
182 virtual void setVisibility(
bool visibility);
187 virtual GLuint getOrCreateAndRecordVAO(
const osg::RenderInfo& renderInfo)
const;
188 virtual void clearVAO(
const osg::RenderInfo& renderInfo);
189 virtual void recordVAO(GLuint vao)
const;
198 virtual void setUpShadersIfNecessary(osgUtil::CullVisitor* cullVisitor);
201 virtual void installIndirectRenderingProgram(
DtOsgShaderFilesCache* shaderFilesCache,
const std::string& shaderFolderPath, osg::StateSet* ss)
const;
205 virtual void installDefaultMaterial(osg::StateSet* ss);
235 #if INDIRECTGEOMETRY_CONSTRUCT_DESTRUCT_DEBUG
236 static tbb::atomic<int> myRefCount;
258 static const std::string& theClassName();