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);
250 const LoadFileOptions& loadFileOptions,
const osg::UserDataContainer *optionsUserData);
254 const LoadFileOptions& loadFileOptions,
const osg::UserDataContainer *optionsUserData);
262 const osg::UserDataContainer* optionsUserData =0L);
267 const osg::UserDataContainer* optionsUserData = 0L);
271 const std::string&
filename,
const osgDB::ReaderWriter::Options* options);
274 void ts_encryptImage(
const std::string& inputFileName,
275 const std::string& outputFilename,
const osgDB::ReaderWriter::Options* options,
bool printToConsole);
278 bool ts_resolveRelativeFilename(
const LoadFileOptions& loadFileOptions,
279 std::string& absoluteInputFilename );
282 virtual void ts_clearInstancingCache();
286 virtual void applyEffectTexture(osg::Node* node,
const std::string& extension,
287 bool isCdb, osgDB::ReaderWriter::Options* option);
294 virtual bool save(
const std::string& origFilename,
295 const std::string& cachedFilename,
bool optimize);
298 bool saveToAcceleratedFile(
const std::string& origFileName,
299 osg::Node* nodeRef,
const std::string& cachedFilename,
300 bool writeExternalReferences);
303 virtual void addMetaFlightOptions(std::string& optionsString);
306 virtual bool needsShaderGeneration(
const std::string& extension,
const LoadFileOptions& options)
const;
309 virtual void updateGlobalOptions();
312 virtual void slot_onDdsFlipChanged(
bool flip);
315 virtual void slot_instancingChanged(
bool enabled);
318 virtual bool getAttrFromLocalCache(
const std::string&
filename, osg::Object** attrData);
328 virtual void squishImage(
const std::string& fileToLoad,
const std::string& acceleratedFilename,
DtCVMarkerSeries& objectCreation,
335 virtual void saveImageFilename(
const std::string& absoluteInputFilename,
osg::Image* image);
347 typedef std::map< std::string, osg::ref_ptr<osg::Object> >
AttrCacheMap;
388 #include <vrvOsg/DtOsgReferencedCollection.inl>
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
tbb::spin_rw_mutex myRelativePathMutex
Definition: DtOsgFileCache.h:354
RelativePathCache myRelativePathCache
Definition: DtOsgFileCache.h:355
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:347
#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:348
DtOsgReferencedCollection< osg::Node > myNodeCollection
Definition: DtOsgFileCache.h:344
Creates a series/span line in the CV tool.
Definition: DtConcurrencyViewerMacros.h:27
The abstract creator for the abstract DtFileCache class.
Definition: DtFileCache.h:273
tbb::atomic< int > myNumDiguyWorkerThreads
Definition: DtOsgFileCache.h:371
brief DtEffectControllerShaderCache is a cache for shaders used by effect texture controller ...
Definition: DtEffectControllerShaderCache.h:26
unsigned int myMaxFlushImageCount
Definition: DtOsgFileCache.h:352
osg::ref_ptr< osg::Node > findNodeFile(const std::string &inputFilename)
Find a node file.
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.
Definition: DtOsgFileCache.h:179
The DtOsgFileCache creator.
Definition: DtOsgFileCache.h:376
boost::signalslib::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readNodeCallback
Signaled emitted when osg calls readNodeFile.
Definition: DtOsgFileCache.h:165
int myNumActivePagerThreads
Definition: DtOsgFileCache.h:369
Contains makVrv::DtFileCache class.
The OSG implementation of makVrv::DtOsgFileCache.
Definition: DtOsgFileCache.h:54
DtOsgReferencedCollection< osg::Image > myImageCollection
Definition: DtOsgFileCache.h:346
boost::signalslib::signal< void(const std::string &filename, osgDB::ReaderWriter::ReadResult &, const osgDB::ReaderWriter::Options *)> signal_readImageCallback
Signaled emitted when osg calls readImageFile.
Definition: DtOsgFileCache.h:172
boost::unordered_map< std::string, std::string > RelativePathCache
Definition: DtOsgFileCache.h:342
Contains the DtEffectControllerShaderCache class declaration.
DtOsgShaderManager & myShaderManager
Definition: DtOsgFileCache.h:359
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.
Definition: DtOsgFileCache.h:144
DtOsgShaderFilesCache & myShaderFilesCache
Definition: DtOsgFileCache.h:360
DtEffectControllerShaderCache myEffectControllerShaderCache
Definition: DtOsgFileCache.h:364
DtMetaFileManager * myMetaFileManager
Definition: DtOsgFileCache.h:357
Definition: DtFileCache.h:60
tbb::atomic< int > myNumSleepingPagerThreads
Definition: DtOsgFileCache.h:370
osg::ref_ptr< DtReadFileCallback > myReadFileCallback
Definition: DtOsgFileCache.h:366
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:361
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.
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:356
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
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.
Definition: DtOsgFileCache.h:158
Contains makVrv::DtOsgReferencedCollection class.
unsigned int myMaxFlushTextureCount
Definition: DtOsgFileCache.h:350
Contains the DtCVMarkerSeries and DtCVMarkerSeries class declarations responsible for wrapping up to ...
unsigned int myMaxFlushNodeCount
Definition: DtOsgFileCache.h:351
Handles the caching of files.
Definition: DtFileCache.h:52
DtOsgReferencedCollection< DtTextureCollection > myTextureCollection
Definition: DtOsgFileCache.h:345
Contains the DtEffectControllerContainer class.