18#ifndef INCLUDED_LOSTEXTURE
19#define INCLUDED_LOSTEXTURE
98 std::unique_ptr<Renderer::Backend::ITexture>
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
uint32_t m_WhichTexture
Definition: LOSTexture.h:102
const CMatrix3D & GetTextureMatrix()
Returns a matrix to map (x,y,z) world coordinates onto (u,v) LOS texture coordinates,...
Definition: LOSTexture.cpp:224
void ConstructTexture(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: LOSTexture.cpp:236
CMatrix3D m_TextureMatrix
Definition: LOSTexture.h:114
size_t m_TextureFormatStride
Definition: LOSTexture.h:97
size_t GetBitmapSize(size_t w, size_t h, size_t *pitch)
Definition: LOSTexture.cpp:405
std::unique_ptr< Renderer::Backend::IFramebuffer > m_SmoothFramebuffers[2]
Definition: LOSTexture.h:109
~CLOSTexture()
Definition: LOSTexture.cpp:72
void DeleteTexture()
Definition: LOSTexture.cpp:107
void InterpolateLOS(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: LOSTexture.cpp:127
CMatrix3D m_MinimapTextureMatrix
Definition: LOSTexture.h:115
const CMatrix3D & GetMinimapTextureMatrix()
Returns a matrix to map (0,0)-(1,1) texture coordinates onto LOS texture coordinates,...
Definition: LOSTexture.cpp:230
bool m_ShaderInitialized
Definition: LOSTexture.h:90
double m_LastTextureRecomputeTime
Definition: LOSTexture.h:103
std::unique_ptr< Renderer::Backend::ITexture > m_SmoothTextures[2]
Definition: LOSTexture.h:99
bool m_Dirty
Definition: LOSTexture.h:88
void RecomputeTexture(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: LOSTexture.cpp:341
bool CreateShader()
Definition: LOSTexture.cpp:82
void MakeDirty()
Marks the LOS texture as needing recomputation.
Definition: LOSTexture.cpp:114
size_t m_MapSize
Definition: LOSTexture.h:112
CShaderTechniquePtr m_SmoothTech
Definition: LOSTexture.h:110
Renderer::Backend::ITexture * GetTextureSmooth()
Definition: LOSTexture.cpp:119
void GenerateBitmap(const CLosQuerier &los, u8 *losData, size_t w, size_t h, size_t pitch)
Definition: LOSTexture.cpp:411
std::unique_ptr< Renderer::Backend::ITexture > m_Texture
Definition: LOSTexture.h:99
Renderer::Backend::Format m_TextureFormat
Definition: LOSTexture.h:95
Renderer::Backend::IVertexInputLayout * m_VertexInputLayout
Definition: LOSTexture.h:100
friend class TestLOSTexture
Definition: LOSTexture.h:41
CLOSTexture(CSimulation2 &simulation)
Definition: LOSTexture.cpp:65
Renderer::Backend::ITexture * GetTexture()
Recomputes the LOS texture if necessary, and returns the texture handle.
Definition: LOSTexture.cpp:218
CSimulation2 & m_Simulation
Definition: LOSTexture.h:86
Object providing efficient abstracted access to the LOS state.
Definition: Los.h:47
Definition: Matrix3D.h:34
Public API for simulation system.
Definition: Simulation2.h:47
Definition: IDeviceCommandContext.h:42
Definition: ITexture.h:34
Format
Definition: Format.h:28
uint8_t u8
Definition: types.h:37
unsigned int uint32_t
Definition: wposix_types.h:53