All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IconsModule.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Icons.h"
7 #include "AsyncTexturing.h"
8 #include "Helpers.h"
9 #include "IconSet.h"
10 #include "Modules.h"
11 #include "Text.h"
12 #include "Rendering.h"
13 #include "AllVertexTypes.h"
14 #include "RenderableFilters.h"
15 #include "Config.h"
16 #include "IconsModuleConfiguration.h"
17 
18 namespace Eegeo
19 {
20  namespace Icons
21  {
23  {
24  public:
25 
26 
27  ~IconsModule();
28 
29  static IconsModule* Create(Helpers::IFileIO& fileIO,
30  Modules::Core::AsyncLoadersModule& asyncLoadersModule,
31  Modules::Core::RenderingModule& renderingModule,
32  const Config::PlatformConfig& platformConfig);
33 
34  void PreDraw();
35 
36  IScreenIconRenderer& GetScreenIconRenderer() const { return *m_pScreenIconRenderer; }
37  IWorldIconRenderer& GetWorldIconRenderer() const { return *m_pWorldIconRenderer; }
38  Rendering::IRenderableFilter& GetRenderableFilters() const { return *m_pRenderableFilters; }
39 
40  const IconSet& GetEnvironmentIconSet() const;
41 
42  static IconsModuleConfiguration DefaultConfig();
43 
44  private:
45 
46 
47  IconsModule(const std::string& pinSheetManifestPath,
48  bool iconsEnabled,
49  IconSetRepository* pIconSetRepository,
50  IconSetLoader* pIconSetLoader,
51  IconSetService* pIconSetService,
54  const Text::GlBuffer<u16>* pQuadIndexBuffer,
55  IBatchedScreenIconRenderableFactory* pBatchedScreenIconRenderableFactory,
56  IBatchedWorldIconRenderableFactory* pBatchedWorldIconRenderableFactory,
58  IconMaterialSetFactory* pIconMaterialSetFactory,
59  IconMaterialSetCache* pIconMaterialSetCache,
60  IScreenIconRenderer* pScreenIconRenderer,
61  IWorldIconRenderer* pWorldIconRenderer,
62  Rendering::RenderableFilters* pRenderableFilters);
63 
64  void LoadResources(const std::string& iconSetJsonPath);
65 
66 
67  IconSetRepository* m_pIconSetRepository;
68  IconSetLoader* m_pIconSetLoader;
69  IconSetService* m_pIconSetService;
70 
71  IconSet::TIdType m_environmentIconSet;
72 
75  const Text::GlBuffer<u16>* m_pQuadIndexBuffer;
76  IBatchedScreenIconRenderableFactory* m_pBatchedScreenIconRenderableFactory;
77  IBatchedWorldIconRenderableFactory* m_pBatchedWorldIconRenderableFactory;
79  IconMaterialSetFactory* m_pIconMaterialSetFactory;
80  IconMaterialSetCache* m_pIconMaterialSetCache;
81  IScreenIconRenderer* m_pScreenIconRenderer;
82  IWorldIconRenderer* m_pWorldIconRenderer;
83  Rendering::RenderableFilters* m_pRenderableFilters;
84 
85  };
86  }
87 }