18#ifndef INCLUDED_LOSTEXTURE
19#define INCLUDED_LOSTEXTURE
99 std::unique_ptr<Renderer::Backend::ITexture>
109 std::unique_ptr<Renderer::Backend::IFramebuffer>
std::shared_ptr< CShaderTechnique > CShaderTechniquePtr
Definition: ShaderTechniquePtr.h:30
Maintains the LOS (fog-of-war / shroud-of-darkness) texture, used for rendering and for the minimap.
Definition: LOSTexture.h:41
uint32_t m_WhichTexture
Definition: LOSTexture.h:103
const CMatrix3D & GetTextureMatrix()
Returns a matrix to map (x,y,z) world coordinates onto (u,v) LOS texture coordinates,...
Definition: LOSTexture.cpp:222
void ConstructTexture(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: LOSTexture.cpp:234
CMatrix3D m_TextureMatrix
Definition: LOSTexture.h:115
size_t m_TextureFormatStride
Definition: LOSTexture.h:98
size_t GetBitmapSize(size_t w, size_t h, size_t *pitch)
Definition: LOSTexture.cpp:400
std::unique_ptr< Renderer::Backend::IFramebuffer > m_SmoothFramebuffers[2]
Definition: LOSTexture.h:110
~CLOSTexture()
Definition: LOSTexture.cpp:104
void DeleteTexture()
Definition: LOSTexture.cpp:113
void InterpolateLOS(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: LOSTexture.cpp:133
void RecomputeTexture(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, bool shouldUpdateSmoothTextures)
Definition: LOSTexture.cpp:336
CMatrix3D m_MinimapTextureMatrix
Definition: LOSTexture.h:116
const CMatrix3D & GetMinimapTextureMatrix()
Returns a matrix to map (0,0)-(1,1) texture coordinates onto LOS texture coordinates,...
Definition: LOSTexture.cpp:228
double m_LastTextureRecomputeTime
Definition: LOSTexture.h:104
std::unique_ptr< Renderer::Backend::ITexture > m_SmoothTextures[2]
Definition: LOSTexture.h:100
bool m_Dirty
Definition: LOSTexture.h:89
void MakeDirty()
Marks the LOS texture as needing recomputation.
Definition: LOSTexture.cpp:120
size_t m_MapSize
Definition: LOSTexture.h:113
bool m_WasSmoothLOSEnabled
Definition: LOSTexture.h:91
CShaderTechniquePtr m_SmoothTech
Definition: LOSTexture.h:111
Renderer::Backend::ITexture * GetTextureSmooth()
Definition: LOSTexture.cpp:125
std::unique_ptr< Renderer::Backend::ITexture > m_Texture
Definition: LOSTexture.h:100
Renderer::Backend::Format m_TextureFormat
Definition: LOSTexture.h:96
Renderer::Backend::IVertexInputLayout * m_VertexInputLayout
Definition: LOSTexture.h:101
friend class TestLOSTexture
Definition: LOSTexture.h:43
CLOSTexture(CSimulation2 &simulation)
Definition: LOSTexture.cpp:80
Renderer::Backend::ITexture * GetTexture()
Recomputes the LOS texture if necessary, and returns the texture handle.
Definition: LOSTexture.cpp:216
void GenerateBitmap(const CLosQuerier &los, std::uint8_t *losData, size_t w, size_t h, size_t pitch)
Definition: LOSTexture.cpp:406
CSimulation2 & m_Simulation
Definition: LOSTexture.h:87
Object providing efficient abstracted access to the LOS state.
Definition: Los.h:48
Definition: Matrix3D.h:36
Public API for simulation system.
Definition: Simulation2.h:57
Definition: IDeviceCommandContext.h:46
Definition: ITexture.h:33
Definition: Canvas2D.h:30
Format
Definition: Format.h:28