24 #include <osgDB/ReaderWriter>
27 #include <boost/signals2.hpp>
29 #include <tbb/atomic.h>
30 #include <tbb/spin_rw_mutex.h>
35 class GraphicsContext;
43 class DtMeifConverter;
44 class DtMetaFileManager;
45 class DtOsgShaderManager;
46 class DtOsgShaderFilesCache;
47 class DtEffectControllerFactory;
48 class DtReadFileCallback;
49 class DtModelDefinition;
68 virtual void initSingletonDependencies();
77 virtual void releaseResources(osg::State* state);
85 static void optimizeNodeGeometry(osg::Node* node);
90 osg::Node* readNodeFile(
const std::string& inputFilename,
91 const LoadFileOptions& loadFileOptions);
97 return ts_findNodeFile(inputFilename);
103 osg::Image* readImageFile(
const std::string& inputFilename,
104 const LoadFileOptions& loadFileOptions);
108 virtual osg::Texture* getTextureInstance(
const std::string& filePath,
109 osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter,
110 osg::Texture::WrapMode s, osg::Texture::WrapMode t,
111 const LoadFileOptions& loadFileOptions);
116 virtual void ts_getTextureInstance(
const std::string& filePath,
117 osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter,
118 osg::Texture::WrapMode s, osg::Texture::WrapMode t,
122 virtual void runMergeDuplicateTextureVisitor(osg::Node& node);
125 virtual void encodeOptionsString(
const LoadFileOptions& loadFileOptions,
126 osgDB::ReaderWriter::Options& options)
const;
129 virtual void decodeOptions(
const osgDB::ReaderWriter::Options& options,
130 LoadFileOptions& loadFileOptions)
const;
138 void cleanDataFilePathList(FilePathList& fileList);
144 boost::signals2::signal<void (osg::Node*,
const std::string& origFileName,
151 boost::signals2::signal<void (
osg::Image*,
const std::string& origFileName,
158 boost::signals2::signal<void(osg::Object*,
const std::string& origFileName,
164 boost::signals2::signal<void (
const std::string&
filename,
165 osgDB::ReaderWriter::ReadResult&,
const osgDB::ReaderWriter::Options*)>
171 boost::signals2::signal<void (
const std::string&
filename,
172 osgDB::ReaderWriter::ReadResult&,
const osgDB::ReaderWriter::Options*)>
178 boost::signals2::signal<void(
const std::string&
filename,
179 osgDB::ReaderWriter::ReadResult&,
const osgDB::ReaderWriter::Options*)>
188 virtual const std::string& loadShaderSource(
const std::string& shaderFile)
const;
192 virtual std::string ts_getTextureFilePathAndSetNameIfNotSet(
const osg::Texture* baseTexture)
const;
198 virtual void ts_setEffectTextureFilterAndHardwareMipMapGen(
osg::Texture* effectTexture, osg::Texture::FilterMode minFilter, osg::Texture::FilterMode magFilter,
bool hardwareMipMapGen)
const;
201 virtual void ts_compareAndSwapIgnoreHint(
osg::Texture* effectTexture,
bool oldVal,
bool newVal)
const;
207 virtual bool ts_checkAndSetIgnoreHint(osg::Object* obj,
bool val,
const char* hint)
const;
211 virtual bool ts_ignore(osg::Object* obj,
const char* hint)
const;
217 virtual void setNumActivePagerThreads(
int active);
220 virtual int numActivePagerThreads();
223 virtual int numImageProcessingTasks()
const;
226 virtual void setNumDiguyWorkerThreads(
int num);
230 virtual void incrementNumSleepingPagerThreads();
233 virtual void decrementNumSleepingPagerThreads();
242 virtual void ts_flushInstancingCache(
bool multipass,
243 bool flushNodes,
bool flushTextures,
bool flushImages);
251 const LoadFileOptions& loadFileOptions,
const osg::UserDataContainer *optionsUserData);
255 const LoadFileOptions& loadFileOptions,
const osg::UserDataContainer *optionsUserData);
263 const osg::UserDataContainer* optionsUserData =0L);
268 const osg::UserDataContainer* optionsUserData = 0L);
272 const std::string&
filename,
const osgDB::ReaderWriter::Options* options);
275 void ts_encryptImage(
const std::string& inputFileName,
276 const std::string& outputFilename,
const osgDB::ReaderWriter::Options* options,
bool printToConsole);
279 bool ts_resolveRelativeFilename(
const LoadFileOptions& loadFileOptions,
280 std::string& absoluteInputFilename );
283 virtual void ts_clearInstancingCache();
287 virtual void applyEffectTexture(osg::Node* node,
const std::string& extension,
288 bool isCdb, osgDB::ReaderWriter::Options* option);
295 virtual bool save(
const std::string& origFilename,
296 const std::string& cachedFilename,
bool optimize);
299 bool saveToAcceleratedFile(
const std::string& origFileName,
300 osg::Node* nodeRef,
const std::string& cachedFilename,
301 bool writeExternalReferences);
304 virtual void addMetaFlightOptions(std::string& optionsString);
307 virtual bool needsShaderGeneration(
const std::string& extension,
const LoadFileOptions& options)
const;
310 virtual void updateGlobalOptions();
313 virtual void slot_onDdsFlipChanged(
bool flip);
316 virtual void slot_instancingChanged(
bool enabled);
319 virtual bool getAttrFromLocalCache(
const std::string&
filename, osg::Object** attrData);
329 virtual void squishImage(
const std::string& fileToLoad,
const std::string& acceleratedFilename,
DtCVMarkerSeries& objectCreation,
336 virtual void saveImageFilename(
const std::string& absoluteInputFilename,
osg::Image* image);
348 typedef std::map< std::string, osg::ref_ptr<osg::Object> >
AttrCacheMap;
389 #include <vrvOsg/DtOsgReferencedCollection.inl>
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
tbb::spin_rw_mutex myRelativePathMutex
Definition: DtOsgFileCache.h:355
RelativePathCache myRelativePathCache
Definition: DtOsgFileCache.h:356
Contains makVrv::DtTextureCollection class.
virtual void releaseResources()
Release all rendering resources.
Definition: DtOsgFileCache.h:71
std::map< std::string, osg::ref_ptr< osg::Object > > AttrCacheMap
Definition: DtOsgFileCache.h:348
#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:349
DtOsgReferencedCollection< osg::Node > myNodeCollection
Definition: DtOsgFileCache.h:345
Creates a series/span line in the CV tool.
Definition: DtConcurrencyViewerMacros.h:27
The abstract creator for the abstract DtFileCache class.
Definition: DtFileCache.h:272
boost::signals2::signal< void(osg::Object *, const std::string &origFileName, const std::string &actualFileName)> signal_objectFileLoaded
Signal emitted whenever an object file is loaded from disk.
Definition: DtOsgFileCache.h:159
tbb::atomic< int > myNumDiguyWorkerThreads
Definition: DtOsgFileCache.h:372
brief DtEffectControllerShaderCache is a cache for shaders used by effect texture controller ...
Definition: DtEffectControllerShaderCache.h:26
unsigned int myMaxFlushImageCount
Definition: DtOsgFileCache.h:353
osg::ref_ptr< osg::Node > findNodeFile(const std::string &inputFilename)
Find a node file.
Definition: DtOsgFileCache.h:95
Definition: DtOsgShaderFilesCache.h:22
The DtOsgFileCache creator.
Definition: DtOsgFileCache.h:377
boost::signals2::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readObjectCallback
Signaled emitted when osg calls readObject.
Definition: DtOsgFileCache.h:180
int myNumActivePagerThreads
Definition: DtOsgFileCache.h:370
Contains makVrv::DtFileCache class.
The OSG implementation of makVrv::DtOsgFileCache.
Definition: DtOsgFileCache.h:55
DtOsgReferencedCollection< osg::Image > myImageCollection
Definition: DtOsgFileCache.h:347
boost::unordered_map< std::string, std::string > RelativePathCache
Definition: DtOsgFileCache.h:343
Contains the DtEffectControllerShaderCache class declaration.
DtOsgShaderManager & myShaderManager
Definition: DtOsgFileCache.h:360
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))
DtOsgShaderFilesCache & myShaderFilesCache
Definition: DtOsgFileCache.h:361
boost::signals2::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readImageCallback
Signaled emitted when osg calls readImageFile.
Definition: DtOsgFileCache.h:173
DtEffectControllerShaderCache myEffectControllerShaderCache
Definition: DtOsgFileCache.h:365
DtMetaFileManager * myMetaFileManager
Definition: DtOsgFileCache.h:358
Definition: DtFileCache.h:60
tbb::atomic< int > myNumSleepingPagerThreads
Definition: DtOsgFileCache.h:371
boost::signals2::signal< void(osg::Image *, const std::string &origFileName, const std::string &actualFileName)> signal_imageFileLoaded
Signal emitted whenever an image file is loaded from disk.
Definition: DtOsgFileCache.h:152
osg::ref_ptr< DtReadFileCallback > myReadFileCallback
Definition: DtOsgFileCache.h:367
DtOsgShaderManager injects custom shaders into the scenes, and keeps their uniform parameters set to ...
Definition: DtOsgShaderManager.h:55
Record for the settings associated with the VRV caching.
Definition: DtCacheSettingsRecord.h:20
Definition: DtReadFileCallback.h:21
DtEffectControllerFactory & myEffectControllerFactory
Definition: DtOsgFileCache.h:362
The scene object creators are registered with the scene object factory for accessing DtSceneObjectCre...
Definition: DtEffectControllerFactory.h:31
DtMeifConverter * myImageCompressor
Definition: DtOsgFileCache.h:357
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains makVrv::DtOsgReferencedCollection class.
unsigned int myMaxFlushTextureCount
Definition: DtOsgFileCache.h:351
Contains the DtCVMarkerSeries and DtCVMarkerSeries class declarations responsible for wrapping up to ...
unsigned int myMaxFlushNodeCount
Definition: DtOsgFileCache.h:352
Handles the caching of files.
Definition: DtFileCache.h:52
DtOsgReferencedCollection< DtTextureCollection > myTextureCollection
Definition: DtOsgFileCache.h:346
boost::signals2::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readNodeCallback
Signaled emitted when osg calls readNodeFile.
Definition: DtOsgFileCache.h:166
Contains the DtEffectControllerContainer class.
boost::signals2::signal< void(osg::Node *, const std::string &origFileName, const std::string &actualFileName)> signal_nodeFileLoaded
Signal emitted whenever a Node file is loaded from disk.
Definition: DtOsgFileCache.h:145