VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgShaderFilesCache.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2020 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 
11 #pragma once
12 
13 #include <vrvOsg/vrvOsg.h>
14 
16 
18 
19 #include <osg/Referenced>
20 
21 #include <boost/thread.hpp>
22 
23 namespace makVrv
24 {
28  {
29  public:
31  virtual ~DtOsgShaderFilesCache();
32 
33  protected:
36  private:
37  // not allowed
38  DtOsgShaderFilesCache() = delete;
39 
41  DtOsgShaderFilesCache(const DtOsgShaderFilesCache& rhs) = delete;
42 
44  DtOsgShaderFilesCache& operator=(const DtOsgShaderFilesCache& rhs) = delete;
45 
46  public:
48  virtual const std::string& loadShaderSource(const std::string& strFileName, bool logWarning = true) const;
49 
51  virtual void PreReloadShaders(void);
52 
54  virtual void PostReloadShaders(void);
55 
56  public:
59  static DtOsgShaderFilesCache& instance(DtDe& de);
60 
61  protected:
62  static const std::string theEmptyString;
63 
64  protected:
67 
69 
70  mutable boost::mutex myMutex;
71  };
72 }
static const std::string theEmptyString
Definition: DtOsgShaderFilesCache.h:62
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::map< std::string, std::string > MapStringToString
Definition: DtCommonTypes.h:24
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
class for holding loader shader files, so that they are not repeatedly loaded from disk ...
Definition: DtOsgShaderFilesCache.h:27
boost::mutex myMutex
Definition: DtOsgShaderFilesCache.h:70
Contains makVrv::DtVirtualBaseClass class.
DtDe & myDe
Definition: DtOsgShaderFilesCache.h:68
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
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
MapStringToString myMutableShaderFilesCache
Definition: DtOsgShaderFilesCache.h:65
OpenThreads::Mutex myShaderFilesCacheMutex
Definition: DtOsgShaderFilesCache.h:66

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)