VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectShaderManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
18 
19 #include <tbb/concurrent_hash_map.h>
20 
21 namespace makVrv
22 {
23  class DtDe;
24 
25  class DtIndirectDefaultDrawComponent;
26  class DtIndirectLightPointDrawComponent;
27  class DtIndirectDebugCullComponent;
28  class DtEffectTextureRegistry;
29 
33  {
34  public:
37  public:
40  };
41 
43  {
46  };
47 
51  {
52  public:
54  virtual ~DtIndirectShaderManager();
55 
57  static DtIndirectShaderManager& instance(DtDe& de);
58 
59  protected:
62 
63  private:
65  DtIndirectShaderManager() = delete;
69  DtIndirectShaderManager& operator=(const DtIndirectShaderManager&) = delete;
70 
71  public:
73  virtual DtIndirectShaderComponents* getOrCreate(const DtIndirectEffectTexturesTemplate& effectTexturesTemplate
74  , int numTextCoordArrays);
75 
77  virtual DtIndirectShaderComponents* find(const DtIndirectEffectTexturesTemplate& effectTexturesTemplate
78  , int numTextCoordArrays);
79 
80  virtual DtIndirectDebugCullComponent* debugComponent(void) const;
81 
90  virtual std::string glslTextureDeclarationHashDefine(const DtIndirectEffectTexturesTemplate& effectTexturesState, unsigned int numTextureCoordArrays) const;
91  virtual void printHashDefineDetails(const DtIndirectEffectTexturesTemplate& effectTexturesState) const;
93 
95  virtual std::string hashString(const DtIndirectEffectTexturesTemplate& effectTexturesState, unsigned int numTextureCoordArrays) const;
96  protected:
97  size_t hash(const DtIndirectEffectTexturesTemplate& effectTexturesTemplate, int numTextCoordArrays);
98 
100  virtual void compareAndInsertHashDefine(std::stringstream& ss, int type, int effectTextureIdx) const;
101 
103  virtual void slot_reloadShaders();
104 
105  protected:
107 
108  typedef tbb::concurrent_hash_map< size_t, DtIndirectShaderComponents*> HashTable;
110 
111  mutable DtIndirectDebugCullComponent* myIndirectDebugCullComponent = nullptr;
112 
114 
116  };
117 }
This manages the draw components (shader vp wrappers) for combinations of DtIndirectEffectTexturesTem...
Definition: DtIndirectShaderManager.h:50
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
DtDe & myDe
Definition: DtIndirectShaderManager.h:106
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Definition: DtIndirectDebugCullComponent.h:45
DtIndirectEffectTexturesTemplate * myEffectTexturesTemplate
Definition: DtIndirectShaderManager.h:44
DtIndirectLightPointDrawComponent * myLightPointDrawComponent
Definition: DtIndirectShaderManager.h:39
DtEffectTextureRegistry & myEffectTextureRegistry
Definition: DtIndirectShaderManager.h:113
Contains the DtIndirectEffectTexturesTemplate class declaration.
Contains makVrv::DtVirtualBaseClass class.
class which holds some static utility functions for handling effect textures once we work out how to ...
Definition: DtEffectTextureRegistry.h:32
HashTable myHashTable
Definition: DtIndirectShaderManager.h:109
DtIndirectDefaultDrawComponent * myDefaultDrawComponent
Definition: DtIndirectShaderManager.h:38
Definition: DtIndirectShaderManager.h:42
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
tbb::concurrent_hash_map< size_t, DtIndirectShaderComponents * > HashTable
Definition: DtIndirectShaderManager.h:108
int myNumTextCoordArrays
Definition: DtIndirectShaderManager.h:45
DtSignalConnectionManager myConnections
Definition: DtIndirectShaderManager.h:115
Base class to provide boost signal/slot management.
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
class to draw a subset of items of an indirect geometry (everything except light points), the default way
Definition: DtIndirectDefaultDrawComponent.h:36
This represents the shader config for a given DtIndirectEffectTexturesTemplate + numTextureCoordArray...
Definition: DtIndirectShaderManager.h:32
Class that allows you to abstractly register effect texture types the effect texture types are client...
Definition: DtIndirectEffectTexturesTemplate.h:40
class to draw a subset of light points of an indirect geometry
Definition: DtIndirectLightPointDrawComponent.h:52

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)