18#ifndef INCLUDED_MINIMAPTEXTURE
19#define INCLUDED_MINIMAPTEXTURE
32#include <unordered_map>
50 void Update(
const float deltaRealTime);
91 const float entityRadius,
const double& currentTime);
94 const float entityRadius);
108 std::unique_ptr<Renderer::Backend::IFramebuffer>
std::shared_ptr< CShaderTechnique > CShaderTechniquePtr
Definition: ShaderTechniquePtr.h:28
Maintains the LOS (fog-of-war / shroud-of-darkness) texture, used for rendering and for the minimap.
Definition: LOSTexture.h:39
Definition: MiniMapTexture.h:41
VertexArray::Attribute m_AttributePos
Definition: MiniMapTexture.h:126
VertexIndexArray m_IndexArray
Definition: MiniMapTexture.h:124
float m_WaterHeight
Definition: MiniMapTexture.h:119
VertexArray::Attribute m_AttributeColor
Definition: MiniMapTexture.h:127
VertexArray m_InstanceVertexArray
Definition: MiniMapTexture.h:131
std::vector< Icon > m_Icons
Definition: MiniMapTexture.h:143
const std::vector< Icon > & GetIcons()
Definition: MiniMapTexture.h:76
CShaderTechniquePtr m_TerritoryTechnique
Definition: MiniMapTexture.h:134
NONCOPYABLE(CMiniMapTexture)
std::unordered_map< CellIconKey, std::vector< CellIcon >, CellIconKeyHash, CellIconKeyEqual > m_IconsCache
Definition: MiniMapTexture.h:166
void Render(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, CLOSTexture &losTexture, CTerritoryTexture &territoryTexture)
Redraws the texture if it's dirty.
Definition: MiniMapTexture.cpp:356
void DrawEntities(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const float entityRadius)
Definition: MiniMapTexture.cpp:802
bool IsFlipped() const
Definition: MiniMapTexture.h:61
Renderer::Backend::IVertexInputLayout * m_EntitiesVertexInputLayout
Definition: MiniMapTexture.h:122
void UpdateAndUploadEntities(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const float entityRadius, const double ¤tTime)
Definition: MiniMapTexture.cpp:621
double m_NextBlinkTime
Definition: MiniMapTexture.h:140
ssize_t m_MapSize
Definition: MiniMapTexture.h:115
double m_PingDuration
Definition: MiniMapTexture.h:138
VertexArray::Attribute m_InstanceAttributePosition
Definition: MiniMapTexture.h:132
void RenderFinalTexture(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, CLOSTexture &losTexture, CTerritoryTexture &territoryTexture)
Definition: MiniMapTexture.cpp:495
const CTexturePtr & GetTexture() const
Definition: MiniMapTexture.h:59
void Update(const float deltaRealTime)
Marks the texture as dirty if it's old enough to redraw it on Render.
Definition: MiniMapTexture.cpp:347
bool m_UseInstancing
Definition: MiniMapTexture.h:129
size_t m_EntitiesDrawn
Definition: MiniMapTexture.h:136
std::unique_ptr< Renderer::Backend::IFramebuffer > m_FinalTextureFramebuffer
Definition: MiniMapTexture.h:109
float m_ShallowPassageHeight
Definition: MiniMapTexture.h:118
double m_LastFinalTextureUpdate
Definition: MiniMapTexture.h:100
bool m_BlinkState
Definition: MiniMapTexture.h:141
void RebuildTerrainTexture(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CTerrain &terrain)
Definition: MiniMapTexture.cpp:427
bool m_FinalTextureDirty
Definition: MiniMapTexture.h:99
CMiniMapTexture(Renderer::Backend::IDevice *device, CSimulation2 &simulation)
Definition: MiniMapTexture.cpp:193
std::unique_ptr< u32[]> m_TerrainData
Definition: MiniMapTexture.h:112
void CreateTextures(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CTerrain &terrain)
Definition: MiniMapTexture.cpp:370
void DestroyTextures()
Definition: MiniMapTexture.cpp:420
CSimulation2 & m_Simulation
Definition: MiniMapTexture.h:96
VertexArray m_VertexArray
Definition: MiniMapTexture.h:125
double m_HalfBlinkDuration
Definition: MiniMapTexture.h:139
CTexturePtr m_FinalTexture
Definition: MiniMapTexture.h:106
~CMiniMapTexture()
Definition: MiniMapTexture.cpp:342
bool m_TerrainTextureDirty
Definition: MiniMapTexture.h:98
std::unique_ptr< Renderer::Backend::ITexture > m_TerrainTexture
Definition: MiniMapTexture.h:104
Renderer::Backend::IVertexInputLayout * m_QuadVertexInputLayout
Definition: MiniMapTexture.h:121
static float GetShallowPassageHeight()
Definition: MiniMapTexture.cpp:869
bool m_Flipped
Definition: MiniMapTexture.h:101
Public API for simulation system.
Definition: Simulation2.h:47
Maintains the territory boundary texture, used for rendering and for the minimap.
Definition: TerritoryTexture.h:31
Definition: Vector2D.h:32
Definition: IDeviceCommandContext.h:42
Definition: VertexArray.h:138
A VertexArray that is specialised to handle 16-bit array indices.
Definition: VertexArray.h:220
std::shared_ptr< CTexture > CTexturePtr
Definition: Texture.h:23
Definition: MiniMapTexture.h:156
bool operator()(const CellIconKey &lhs, const CellIconKey &rhs) const
Definition: MiniMapTexture.cpp:183
Definition: MiniMapTexture.h:152
size_t operator()(const CellIconKey &key) const
Definition: MiniMapTexture.cpp:172
Definition: MiniMapTexture.h:147
std::string path
Definition: MiniMapTexture.h:148
u8 r
Definition: MiniMapTexture.h:149
u8 b
Definition: MiniMapTexture.h:149
u8 g
Definition: MiniMapTexture.h:149
Definition: MiniMapTexture.h:160
CVector2D worldPosition
Definition: MiniMapTexture.h:164
u16 gridY
Definition: MiniMapTexture.h:162
float halfSize
Definition: MiniMapTexture.h:163
u16 gridX
Definition: MiniMapTexture.h:162
Definition: MiniMapTexture.h:69
CColor color
Definition: MiniMapTexture.h:71
CTexturePtr texture
Definition: MiniMapTexture.h:70
float halfSize
Definition: MiniMapTexture.h:73
CVector2D worldPosition
Definition: MiniMapTexture.h:72
Definition: VertexArray.h:141
uint8_t u8
Definition: types.h:37
uint16_t u16
Definition: types.h:38
intptr_t ssize_t
Definition: wposix_types.h:82
pthread_key_t key
Definition: wpthread.cpp:140