Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MiniMapTexture.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
void Update(const float deltaRealTime); | void Update(const float deltaRealTime); | ||||
/** | /** | ||||
* Redraws the texture if it's dirty. | * Redraws the texture if it's dirty. | ||||
*/ | */ | ||||
void Render(Renderer::Backend::IDeviceCommandContext* deviceCommandContext); | void Render(Renderer::Backend::IDeviceCommandContext* deviceCommandContext); | ||||
Renderer::Backend::ITexture* GetTexture() const { return m_FinalTexture.get(); } | const CTexturePtr& GetTexture() const { return m_FinalTexture; } | ||||
/** | /** | ||||
* @return The maximum height for unit passage in water. | * @return The maximum height for unit passage in water. | ||||
*/ | */ | ||||
static float GetShallowPassageHeight(); | static float GetShallowPassageHeight(); | ||||
struct Icon | struct Icon | ||||
{ | { | ||||
Show All 19 Lines | private: | ||||
CSimulation2& m_Simulation; | CSimulation2& m_Simulation; | ||||
bool m_TerrainTextureDirty = true; | bool m_TerrainTextureDirty = true; | ||||
bool m_FinalTextureDirty = true; | bool m_FinalTextureDirty = true; | ||||
double m_LastFinalTextureUpdate = 0.0; | double m_LastFinalTextureUpdate = 0.0; | ||||
// minimap texture handles | // minimap texture handles | ||||
std::unique_ptr<Renderer::Backend::ITexture> | std::unique_ptr<Renderer::Backend::ITexture> | ||||
m_TerrainTexture, m_FinalTexture; | m_TerrainTexture; | ||||
CTexturePtr m_FinalTexture; | |||||
std::unique_ptr<Renderer::Backend::IFramebuffer> | std::unique_ptr<Renderer::Backend::IFramebuffer> | ||||
m_FinalTextureFramebuffer; | m_FinalTextureFramebuffer; | ||||
// texture data | // texture data | ||||
std::unique_ptr<u32[]> m_TerrainData; | std::unique_ptr<u32[]> m_TerrainData; | ||||
// map size | // map size | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator