27 #include <osg/Geometry>
28 #include <osg/Texture>
29 #include <osg/Referenced>
31 #include <tbb/concurrent_queue.h>
32 #include <tbb/atomic.h>
37 #include <unordered_set>
39 #define INDIRECTGEOMETRYREGISTRAR_DEBUG 0
53 class DtIndirectGeometryRegistrar;
55 class DtIndirectTextureCollectionPolicy;
56 class DtIndirectModelInfoContainer;
58 class DtOsgShaderManager;
60 class DtIndirectModelInfo;
115 ,
const std::string& textureCollectionPolicyName
117 ,
bool supportsPartialTextureUnloading
118 ,
bool supportsPartialBuffersUnloading
138 virtual void setName(
const std::string& name);
146 ,
const std::string& modelFileName,
const std::string& modelDefName
151 virtual void processRegisterModelQueue(
DtOsgRenderer* renderer);
154 virtual bool beingProcessed();
157 virtual unsigned int rebuildIfNeeded(
const osg::GraphicsContext* gc);
160 virtual unsigned int numModelsInQueue()
const;
163 virtual int numModels(
void)
const;
166 virtual int modelId(
int index)
const;
169 virtual int numGeometriesForModelID(
int modelId)
const;
172 virtual bool isModelDownloaded(
int modelId)
const;
198 virtual GLenum indicesType(
void)
const;
203 virtual void releaseGLObjects(osg::State* state)
const;
207 virtual bool registeredModelsDirty()
const;
213 virtual void setPagerHandlesModelLoading(
bool value);
214 virtual bool pagerHandlesModelLoading();
217 virtual int numTexCoordArrays(
void)
const;
220 virtual boost::mutex& addingModelsMutex();
223 virtual bool supportsPartialTextureUnloading(
void)
const;
226 virtual bool supportsPartialBuffersUnloading(
void)
const;
233 virtual void modelsToBeReloaded(
const std::unordered_set<int>& models);
242 virtual void unloadUnreferencedTextures(
void);
245 virtual void trackTexturesAndModels(
const std::unordered_set<int>& models,
bool reloading);
248 virtual void findModelInfosThatUseThisImageFileForItsTextures(std::set<DtIndirectModelInfo*>& modelInfos,
const std::string& absoluteFileName)
const;
252 virtual void registerModel(
int modelId
Definition: DtIndirectGeometryRegistrar.h:264
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:87
DtIndirectPolygonOffset myPolygonOffset
Definition: DtIndirectGeometryRegistrar.h:282
QueueRegisterModelOps myQueueRegisterModelOps
Definition: DtIndirectGeometryRegistrar.h:287
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Contains the DtIndirectTextureProcessor class declaration.
bool myDaylightControlled
Definition: DtIndirectGeometryRegistrar.h:283
Indirect geometry can have multiple models and their corresponding ids registered in it...
Definition: DtIndirectGeometryRegistrar.h:106
Class that loads and contains a bunch of models registered with the registrar. It is owned by the Ind...
Definition: DtIndirectModelInfoContainer.h:76
Abstract class to look in the stateset and collect textures specified via its template The effect tex...
Definition: DtIndirectTextureCollectionPolicy.h:38
std::string myModelFileName
Definition: DtIndirectGeometryRegistrar.h:279
std::unordered_map< std::string, std::set< int > > myImagesToModelsThatAreUsingIt
map of absolute image file names to models that use it
Definition: DtIndirectGeometryRegistrar.h:313
bool myCullFaceEnabled
Definition: DtIndirectGeometryRegistrar.h:281
Indirect rendering works because we are able to combine multiple geometries into a single 'aggregated...
Definition: DtIndirectGeometryAggregator.h:85
osg::ref_ptr< const osg::Node > myModel
Definition: DtIndirectGeometryRegistrar.h:277
std::string myModelDefName
Definition: DtIndirectGeometryRegistrar.h:280
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
Contains the DtIndirectEffectTexturesTemplate class declaration.
const bool mySupportsPartialTextureUnloading
Definition: DtIndirectGeometryRegistrar.h:315
std::map< osg::ref_ptr< osg::Texture >, std::set< int > > myTextureToModelsThatAreUsingIt
map of texture to the set of models that refer to the texture
Definition: DtIndirectGeometryRegistrar.h:310
DtIndirectEffectTexturesTemplate myEffectTexturesState
Definition: DtIndirectGeometryRegistrar.h:260
unsigned int myLastRebuildNumber
Definition: DtIndirectGeometryRegistrar.h:294
Simple state/glmodes class for handling setting up modes It can now handle generic state modes and at...
Definition: DtIndirectGeometryStateManager.h:31
osg::ref_ptr< DtIndirectTextureProcessor > myTextureProcessor
Definition: DtIndirectGeometryRegistrar.h:291
tbb::atomic< bool > myBeingProcessed
Definition: DtIndirectGeometryRegistrar.h:297
DtIndirectGeometryAggregator * myAggregator
Definition: DtIndirectGeometryRegistrar.h:296
Contains the DtIndirectGeometryStateManager class declaration.
DtDe & myDe
DtDe reference.
Definition: DtIndirectGeometryRegistrar.h:305
bool myPagerHandlesModelLoading
Definition: DtIndirectGeometryRegistrar.h:262
Definition: DtIndirectTextureProcessor.h:42
bool myRegisteredModelsDirty
Definition: DtIndirectGeometryRegistrar.h:293
This class is passed as a pointer to DtIndirectTextureProcessor. The processor then uses this in conj...
Definition: DtIndirectLimitTextureStrategy.h:65
boost::mutex myAddingModelsMutex
Definition: DtIndirectGeometryRegistrar.h:298
Contains makVrv::DtIndirectSwitchManager class.
DtOsgShaderManager injects custom shaders into the scenes, and keeps their uniform parameters set to ...
Definition: DtOsgShaderManager.h:41
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
DtVirtualBaseClassCreator< DtIndirectGeometryRegistrar, const std::string &, const DtIndirectLimitTextureStrategy &, const bool &, const bool & > DtIndirectGeometryRegistrarCreator
creator
Definition: DtIndirectGeometryRegistrar.h:63
Contains makVrv::DtIndirectLodManager class.
DtIndirectGeometryStateManager myMutableStateContainer
mutable since it is needed to be used in drawImplementaion for the indirect geometry not private so i...
Definition: DtIndirectGeometryRegistrar.h:302
non virtual container class for defining a polygon offset state
Definition: DtIndirectPolygonOffset.h:18
Contains DLL export macros.
int myModelId
Definition: DtIndirectGeometryRegistrar.h:276
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
tbb::concurrent_queue< RegisterModelOp > QueueRegisterModelOps
Definition: DtIndirectGeometryRegistrar.h:286
Contains the DtIndirectGeometryAggregator class declaration.
DtIndirectTextureCollectionPolicy * myTextureCollectionPolicy
Definition: DtIndirectGeometryRegistrar.h:289
const bool mySupportsPartialBuffersUnloading
Definition: DtIndirectGeometryRegistrar.h:316
DtOsgShaderManager & myShaderManager
Definition: DtIndirectGeometryRegistrar.h:307
friend DtIndirectGeometryRegistrarCreator
friend class creator so that DtIndirectGeometryRegistrar can only be created by the creator ...
Definition: DtIndirectGeometryRegistrar.h:110
Class that allows you to abstractly register effect texture types the effect texture types are client...
Definition: DtIndirectEffectTexturesTemplate.h:40
DtIndirectModelInfoContainer * myModelInfoContainer
Definition: DtIndirectGeometryRegistrar.h:258
Contains the per Model info which the indirect module needs It is owned by the Indirect geometry regi...
Definition: DtIndirectModelInfo.h:44
const char * creatorTypeName< DtIndirectGeometryRegistrar >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectGeometryRegistrar.h:70