VR-Forces 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) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 
11 #pragma once
12 
13 #include <vrvOsg/vrvOsg.h>
14 
16 
17 #include <vrvMath/DtCommonTypes.h>
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 
50  virtual const std::string& loadProgramBinary(const std::string& strFileName, bool logWarning = true) const;
51 
53  virtual void PreReloadShaders(void);
54 
56  virtual void PostReloadShaders(void);
57 
58  public:
61  static DtOsgShaderFilesCache& instance(DtDe& de);
62 
63  protected:
64  static const std::string theEmptyString;
65 
66  protected:
70 
72 
73  mutable boost::mutex myMutex;
74  };
75 }
static const std::string theEmptyString
Definition: DtOsgShaderFilesCache.h:64
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:73
Contains makVrv::DtVirtualBaseClass class.
DtDe & myDe
Definition: DtOsgShaderFilesCache.h:71
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:72
MapStringToString myMutableProgramBinaryFilesCache
Definition: DtOsgShaderFilesCache.h:68
MapStringToString myMutableShaderFilesCache
Definition: DtOsgShaderFilesCache.h:67
OpenThreads::Mutex myShaderFilesCacheMutex
Definition: DtOsgShaderFilesCache.h:69

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)