24 #include <osgDB/ReaderWriter>
28 #include <tbb/atomic.h>
29 #include <tbb/spin_rw_mutex.h>
34 class GraphicsContext;
42 class DtMeifConverter;
43 class DtMetaFileManager;
44 class DtOsgShaderManager;
45 class DtOsgShaderFilesCache;
46 class DtEffectControllerFactory;
47 class DtReadFileCallback;
48 class DtModelDefinition;
67 virtual void initSingletonDependencies();
76 virtual void releaseResources(osg::State* state);
84 static void optimizeNodeGeometry(osg::Node* node);
89 osg::Node* readNodeFile(
const std::string& inputFilename,
90 const LoadFileOptions& loadFileOptions);
96 return ts_findNodeFile(inputFilename);
102 osg::Image* readImageFile(
const std::string& inputFilename,
103 const LoadFileOptions& loadFileOptions);
107 virtual osg::Texture* getTextureInstance(
const std::string& filePath,
108 osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter,
109 osg::Texture::WrapMode s, osg::Texture::WrapMode t,
110 const LoadFileOptions& loadFileOptions);
115 virtual void ts_getTextureInstance(
const std::string& filePath,
116 osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter,
117 osg::Texture::WrapMode s, osg::Texture::WrapMode t,
121 virtual void runMergeDuplicateTextureVisitor(osg::Node& node);
124 virtual void encodeOptionsString(
const LoadFileOptions& loadFileOptions,
125 osgDB::ReaderWriter::Options& options)
const;
128 virtual void decodeOptions(
const osgDB::ReaderWriter::Options& options,
129 LoadFileOptions& loadFileOptions)
const;
137 void cleanDataFilePathList(FilePathList& fileList);
143 boost::signalslib::signal<void (osg::Node*,
const std::string& origFileName,
150 boost::signalslib::signal<void (
osg::Image*,
const std::string& origFileName,
157 boost::signalslib::signal<void(osg::Object*,
const std::string& origFileName,
163 boost::signalslib::signal<void (
const std::string&
filename,
164 osgDB::ReaderWriter::ReadResult&,
const osgDB::ReaderWriter::Options*)>
170 boost::signalslib::signal<void (
const std::string&
filename,
171 osgDB::ReaderWriter::ReadResult&,
const osgDB::ReaderWriter::Options*)>
177 boost::signalslib::signal<void(
const std::string&
filename,
178 osgDB::ReaderWriter::ReadResult&,
const osgDB::ReaderWriter::Options*)>
187 virtual const std::string& loadShaderSource(
const std::string& shaderFile)
const;
191 virtual std::string ts_getTextureFilePathAndSetNameIfNotSet(
const osg::Texture* baseTexture)
const;
197 virtual void ts_setEffectTextureFilterAndHardwareMipMapGen(
osg::Texture* effectTexture, osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter,
bool hardwareMipMapGen)
const;
200 virtual void ts_compareAndSwapIgnoreHint(
osg::Texture* effectTexture,
bool oldVal,
bool newVal)
const;
206 virtual bool ts_checkAndSetIgnoreHint(osg::Object* obj,
bool val,
const char* hint)
const;
210 virtual bool ts_ignore(osg::Object* obj,
const char* hint)
const;
216 virtual void setNumActivePagerThreads(
int active);
219 virtual int numActivePagerThreads();
222 virtual int numImageProcessingTasks()
const;
225 virtual void setNumDiguyWorkerThreads(
int num);
229 virtual void incrementNumSleepingPagerThreads();
232 virtual void decrementNumSleepingPagerThreads();
241 virtual void ts_flushInstancingCache(
bool multipass,
242 bool flushNodes,
bool flushTextures,
bool flushImages);
245 virtual int numNodes()
const;
248 virtual int numTextures()
const;
251 virtual int numImages()
const;
254 virtual void addImguiTextureUI(
unsigned int contextID);
257 virtual void connectImguiSignal();
265 const LoadFileOptions& loadFileOptions,
const osg::UserDataContainer *optionsUserData);
269 const LoadFileOptions& loadFileOptions,
const osg::UserDataContainer *optionsUserData);
277 const osg::UserDataContainer* optionsUserData =0L);
282 const osg::UserDataContainer* optionsUserData = 0L);
286 const std::string&
filename,
const osgDB::ReaderWriter::Options* options);
289 void ts_encryptImage(
const std::string& inputFileName,
290 const std::string& outputFilename,
const osgDB::ReaderWriter::Options* options,
bool printToConsole);
293 bool ts_resolveRelativeFilename(
const LoadFileOptions& loadFileOptions,
294 std::string& absoluteInputFilename );
297 virtual void ts_clearInstancingCache();
301 virtual void applyEffectTexture(osg::Node* node,
const std::string& extension,
302 bool isCdb, osgDB::ReaderWriter::Options* option);
309 virtual bool save(
const std::string& origFilename,
310 const std::string& cachedFilename,
bool optimize);
313 bool saveToAcceleratedFile(
const std::string& origFileName,
314 osg::Node* nodeRef,
const std::string& cachedFilename,
315 bool writeExternalReferences);
318 virtual void addMetaFlightOptions(std::string& optionsString);
321 virtual bool needsShaderGeneration(
const std::string& extension,
const LoadFileOptions& options)
const;
324 virtual void updateGlobalOptions();
327 virtual void slot_onDdsFlipChanged(
bool flip);
330 virtual void slot_instancingChanged(
bool enabled);
333 virtual bool getAttrFromLocalCache(
const std::string&
filename, osg::Object** attrData);
343 virtual void squishImage(
const std::string& fileToLoad,
const std::string& acceleratedFilename,
DtCVMarkerSeries& objectCreation,
350 virtual void saveImageFilename(
const std::string& absoluteInputFilename,
osg::Image* image);
362 typedef std::map< std::string, osg::ref_ptr<osg::Object> >
AttrCacheMap;
400 #include <vrvOsg/DtOsgReferencedCollection.inl>
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
tbb::spin_rw_mutex myRelativePathMutex
Definition: DtOsgFileCache.h:365
RelativePathCache myRelativePathCache
Definition: DtOsgFileCache.h:366
Contains makVrv::DtTextureCollection class.
virtual void releaseResources()
Release all rendering resources.
Definition: DtOsgFileCache.h:70
std::map< std::string, osg::ref_ptr< osg::Object > > AttrCacheMap
Definition: DtOsgFileCache.h:362
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Class responsible for converting images into MAK encrypted image files.
Definition: DtMeifConverter.h:25
AttrCacheMap myAttrCacheMap
Definition: DtOsgFileCache.h:363
DtOsgReferencedCollection< osg::Node > myNodeCollection
Definition: DtOsgFileCache.h:359
Creates a series/span line in the CV tool.
Definition: DtConcurrencyViewerMacros.h:27
The abstract creator for the abstract DtFileCache class.
Definition: DtFileCache.h:257
tbb::atomic< int > myNumDiguyWorkerThreads
Definition: DtOsgFileCache.h:383
brief DtEffectControllerShaderCache is a cache for shaders used by effect texture controller ...
Definition: DtEffectControllerShaderCache.h:26
osg::ref_ptr< osg::Node > findNodeFile(const std::string &inputFilename)
Find a node file. If the file was already cached then a copy will be returned.
Definition: DtOsgFileCache.h:94
class for holding loader shader files, so that they are not repeatedly loaded from disk ...
Definition: DtOsgShaderFilesCache.h:27
boost::signalslib::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readObjectCallback
Signaled emitted when osg calls readObject. This signal is emitted every time read object is called r...
Definition: DtOsgFileCache.h:179
The DtOsgFileCache creator..
Definition: DtOsgFileCache.h:388
boost::signalslib::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readNodeCallback
Signaled emitted when osg calls readNodeFile. This signal is emitted every time read image is called ...
Definition: DtOsgFileCache.h:165
int myNumActivePagerThreads
Definition: DtOsgFileCache.h:381
Contains makVrv::DtFileCache class.
The OSG implementation of makVrv::DtOsgFileCache. This will cache files as .ive's for quicker load ti...
Definition: DtOsgFileCache.h:54
DtOsgReferencedCollection< osg::Image > myImageCollection
Definition: DtOsgFileCache.h:361
boost::signalslib::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readImageCallback
Signaled emitted when osg calls readImageFile. This signal is emitted every time read image is called...
Definition: DtOsgFileCache.h:172
boost::unordered_map< std::string, std::string > RelativePathCache
Definition: DtOsgFileCache.h:357
Contains the DtEffectControllerShaderCache class declaration.
DtOsgShaderManager & myShaderManager
Definition: DtOsgFileCache.h:370
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
boost::signalslib::signal< void(osg::Node *, const std::string &origFileName, const std::string &actualFileName)> signal_nodeFileLoaded
Signal emitted whenever a Node file is loaded from disk. When instancing is enabled then each file wi...
Definition: DtOsgFileCache.h:144
DtOsgShaderFilesCache & myShaderFilesCache
Definition: DtOsgFileCache.h:371
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtEffectControllerShaderCache myEffectControllerShaderCache
Definition: DtOsgFileCache.h:375
DtMetaFileManager * myMetaFileManager
Definition: DtOsgFileCache.h:368
Definition: DtFileCache.h:44
tbb::atomic< int > myNumSleepingPagerThreads
Definition: DtOsgFileCache.h:382
osg::ref_ptr< DtReadFileCallback > myReadFileCallback
Definition: DtOsgFileCache.h:377
DtOsgShaderManager injects custom shaders into the scenes, and keeps their uniform parameters set to ...
Definition: DtOsgShaderManager.h:41
Record for the settings associated with the VRV caching.
Definition: DtCacheSettingsRecord.h:17
Definition: DtReadFileCallback.h:21
DtEffectControllerFactory & myEffectControllerFactory
Definition: DtOsgFileCache.h:372
boost::signalslib::signal< void(osg::Image *, const std::string &origFileName, const std::string &actualFileName)> signal_imageFileLoaded
Signal emitted whenever an image file is loaded from disk. When instancing is enabled then each file ...
Definition: DtOsgFileCache.h:151
The scene object creators are registered with the scene object factory for accessing DtSceneObjectCre...
Definition: DtEffectControllerFactory.h:31
DtMeifConverter * myImageCompressor
Definition: DtOsgFileCache.h:367
Contains DLL export macros.
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
boost::signalslib::signal< void(osg::Object *, const std::string &origFileName, const std::string &actualFileName)> signal_objectFileLoaded
Signal emitted whenever an object file is loaded from disk. When instancing is enabled then each file...
Definition: DtOsgFileCache.h:158
Contains makVrv::DtOsgReferencedCollection class.
Contains the DtCVMarkerSeries and DtCVMarkerSeries class declarations responsible for wrapping up to ...
Handles the caching of files. Includes functions for excluding files with certain extensions from bei...
Definition: DtFileCache.h:36
DtOsgReferencedCollection< DtTextureCollection > myTextureCollection
Definition: DtOsgFileCache.h:360
DtSignalConnectionManager myConnections
Definition: DtOsgFileCache.h:378
Contains the DtEffectControllerContainer class.