23#ifndef INCLUDED_TERRAINOVERLAY
24#define INCLUDED_TERRAINOVERLAY
147 const CColor& color,
bool drawHidden);
166 const CColor& color,
bool drawHidden);
std::shared_ptr< CShaderTechnique > CShaderTechniquePtr
Definition: ShaderTechniquePtr.h:28
Contains pointers to various 'global' objects that are needed by the simulation code,...
Definition: SimContext.h:33
Common interface for terrain-tile-based and texture-based debug overlays.
Definition: TerrainOverlay.h:44
ITerrainOverlay(int priority)
Definition: TerrainOverlay.cpp:92
NONCOPYABLE(ITerrainOverlay)
virtual ~ITerrainOverlay()
Definition: TerrainOverlay.cpp:105
static void RenderOverlaysBeforeWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Draw all ITerrainOverlay objects that exist and that should be drawn before water.
Definition: TerrainOverlay.cpp:114
virtual void RenderAfterWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
Definition: TerrainOverlay.h:52
static void RenderOverlaysAfterWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
Draw all ITerrainOverlay objects that exist and that should be drawn after water.
Definition: TerrainOverlay.cpp:127
virtual void RenderBeforeWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Definition: TerrainOverlay.h:50
Definition: IDeviceCommandContext.h:42
Base class for (relatively) simple drawing of data onto terrain tiles, intended for debugging purpose...
Definition: TerrainOverlay.h:85
ssize_t m_j
Definition: TerrainOverlay.h:182
CShaderTechniquePtr m_OverlayTechOutlineHidden
Definition: TerrainOverlay.h:187
void RenderTile(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CColor &color, bool drawHidden)
Draw a filled quad on top of the current tile.
Definition: TerrainOverlay.cpp:203
void RenderTileOutline(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CColor &color, bool drawHidden)
Draw an outlined quad on top of the current tile.
Definition: TerrainOverlay.cpp:275
CShaderTechniquePtr m_OverlayTechOutline
Definition: TerrainOverlay.h:187
CShaderTechniquePtr m_OverlayTechTile
Definition: TerrainOverlay.h:186
TerrainOverlay(const CSimContext &simContext, int priority=100)
Construct the object and register it with the global list of terrain overlays.
Definition: TerrainOverlay.cpp:142
CTerrain * m_Terrain
Definition: TerrainOverlay.h:184
virtual void GetTileExtents(ssize_t &min_i_inclusive, ssize_t &min_j_inclusive, ssize_t &max_i_inclusive, ssize_t &max_j_inclusive)
Override to limit the range over which ProcessTile will be called.
Definition: TerrainOverlay.cpp:169
virtual void EndRender()
Override to perform processing at the end of the overlay rendering, after the ProcessTile calls.
Definition: TerrainOverlay.cpp:165
CShaderTechniquePtr m_OverlayTechTileHidden
Definition: TerrainOverlay.h:186
void RenderBeforeWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext) override
Definition: TerrainOverlay.cpp:178
Renderer::Backend::IVertexInputLayout * m_VertexInputLayout
Definition: TerrainOverlay.h:189
virtual void ProcessTile(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, ssize_t i, ssize_t j)=0
Override to perform processing of each tile.
virtual void StartRender()
Override to perform processing at the start of the overlay rendering, before the ProcessTile calls.
Definition: TerrainOverlay.cpp:161
ssize_t m_i
Definition: TerrainOverlay.h:182
Base class for texture-based terrain overlays, with an arbitrary number of texels per terrain tile,...
Definition: TerrainOverlay.h:198
void RenderAfterWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup) override
Definition: TerrainOverlay.cpp:335
virtual void BuildTextureRGBA(u8 *data, size_t w, size_t h)=0
Called each frame to generate the texture to render on the terrain.
TerrainTextureOverlay(float texelsPerTile, int priority=100)
Definition: TerrainOverlay.cpp:328
SColor4ub GetColor(size_t idx, u8 alpha) const
Returns an arbitrary color, for subclasses that want to distinguish different integers visually.
Definition: TerrainOverlay.cpp:373
float m_TexelsPerTile
Definition: TerrainOverlay.h:223
~TerrainTextureOverlay() override
std::unique_ptr< Renderer::Backend::ITexture > m_Texture
Definition: TerrainOverlay.h:224
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning.
Definition: code_annotation.h:40
uint8_t u8
Definition: types.h:37
intptr_t ssize_t
Definition: wposix_types.h:82