All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BlueSphereViewMaterialsContainer.h
1 #pragma once
2 
3 #include "BlueSphere.h"
4 #include "Types.h"
5 #include "Rendering.h"
6 #include "AsyncTexturing.h"
7 #include "Helpers.h"
8 #include "BlueSphereEvents.h"
9 
10 #include <string>
11 #include <vector>
12 #include <map>
13 
14 namespace Eegeo
15 {
16  namespace BlueSphere
17  {
19  {
20  public:
21 
22  static BlueSphereViewMaterialsContainer* Create(
26  const std::string& dayTextureFilename,
27  const std::string& nightTextureFilename
28  );
29 
31 
32  // BlueSphereView
33  Eegeo::Rendering::Shaders::ColorShader& GetBlueSphereHighlightShader() const { return *m_pBlueSphereHighlightShader; }
34  BlueSphereHighlightMaterial& GetBlueSphereHighlightMaterial() const { return *m_pBlueSphereHighlightMaterial; }
35  BlueSphereShader& GetBlueSphereShader() const { return *m_pBlueSphereShader; }
36  BlueSphereMaterial& GetBlueSphereMaterial() const { return *m_pBlueSphereMaterial; }
37  BlueSphereShader& GetBlueSphereNotHiddenShader() const { return *m_pBlueSphereNotHiddenShader; }
38  BlueSphereNotHiddenMaterial& GetBlueSphereNotHiddenMaterial() const { return *m_pBlueSphereNotHiddenMaterial; }
39  Eegeo::Rendering::Shaders::ColorShader& GetBlueSphereHiddenShader() const { return *m_pBlueSphereHiddenShader; }
40  BlueSphereHiddenMaterial& GetBlueSphereHiddenMaterial() const { return *m_pBlueSphereHiddenMaterial; }
41  Eegeo::Rendering::Shaders::ColorShader& GetBlueSphereStencilClearShader() const { return *m_pBlueSphereStencilClearShader; }
42  BlueSphereStencilClearMaterial& GetBlueSphereStencilClearMaterial() const { return *m_pBlueSphereStencilClearMaterial; }
43 
44  // BlueSphereAnchorView
45  Eegeo::Rendering::Shaders::ColorShader& GetBlueSphereAnchorViewHighlightShader() const { return *m_pBlueSphereAnchorViewHighlightShader; }
46  Eegeo::Rendering::Materials::ColorMaterial& GetBlueSphereAnchorViewHighlightMaterial() const { return *m_pBlueSphereAnchorViewHighlightMaterial; }
47  Eegeo::Rendering::Shaders::ColorShader& GetBlueSphereAnchorViewStencilClearShader() const { return *m_pBlueSphereAnchorViewStencilClearShader; }
48  BlueSphereStencilClearMaterial& GetBlueSphereAnchorViewStencilClearMaterial() const { return *m_pBlueSphereAnchorViewStencilClearMaterial; }
49  private:
51  Eegeo::Rendering::Shaders::ColorShader* pBlueSphereHighlightShader,
52  BlueSphereHighlightMaterial* pBlueSphereHighlightMaterial,
53  BlueSphereShader* pBlueSphereShader,
54  BlueSphereMaterial* pBlueSphereMaterial,
55  BlueSphereShader* pBlueSphereNotHiddenShader,
56  BlueSphereNotHiddenMaterial* pBlueSphereNotHiddenMaterial,
57  Eegeo::Rendering::Shaders::ColorShader* pBlueSphereHiddenShader,
58  BlueSphereHiddenMaterial* pBlueSphereHiddenMaterial,
59  Eegeo::Rendering::Shaders::ColorShader* pBlueSphereStencilClearShader,
60  BlueSphereStencilClearMaterial* pBlueSphereStencilClearMaterial,
61  Eegeo::Rendering::Shaders::ColorShader* pBlueSphereAnchorViewHighlightShader,
62  Eegeo::Rendering::Materials::ColorMaterial* pBlueSphereAnchorViewHighlightMaterial,
63  Eegeo::Rendering::Shaders::ColorShader* pBlueSphereAnchorViewStencilClearShader,
64  BlueSphereStencilClearMaterial* pBlueSphereAnchorViewStencilClearMaterial,
65  const std::vector<Rendering::AsyncTexturing::IAsyncTexture*>& asyncTextures
66  );
67 
68  void ReleaseAsyncTextures();
69 
70  // BlueSphereView
71  Eegeo::Rendering::Shaders::ColorShader* const m_pBlueSphereHighlightShader;
72  BlueSphereHighlightMaterial* const m_pBlueSphereHighlightMaterial;
73  BlueSphereShader* const m_pBlueSphereShader;
74  BlueSphereMaterial* const m_pBlueSphereMaterial;
75  BlueSphereShader* const m_pBlueSphereNotHiddenShader;
76  BlueSphereNotHiddenMaterial* const m_pBlueSphereNotHiddenMaterial;
77  Eegeo::Rendering::Shaders::ColorShader* const m_pBlueSphereHiddenShader;
78  BlueSphereHiddenMaterial* const m_pBlueSphereHiddenMaterial;
79  Eegeo::Rendering::Shaders::ColorShader* const m_pBlueSphereStencilClearShader;
80  BlueSphereStencilClearMaterial* const m_pBlueSphereStencilClearMaterial;
81 
82 
83  // BlueSphereAnchorView
84  Eegeo::Rendering::Shaders::ColorShader* const m_pBlueSphereAnchorViewHighlightShader;
85  Eegeo::Rendering::Materials::ColorMaterial* const m_pBlueSphereAnchorViewHighlightMaterial;
86  Eegeo::Rendering::Shaders::ColorShader* const m_pBlueSphereAnchorViewStencilClearShader;
87  BlueSphereStencilClearMaterial* const m_pBlueSphereAnchorViewStencilClearMaterial;
88 
89  std::vector<Rendering::AsyncTexturing::IAsyncTexture*> m_asyncTextures;
90  };
91  }
92 }