![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Class WaterManager: Maintain rendering-related water settings and textures Anything that affects gameplay should go in CcmpWaterManager.cpp and passed to this (possibly as copy). More...
#include <WaterManager.h>

Public Member Functions | |
| WaterManager (Renderer::Backend::IDevice *device) | |
| ~WaterManager () | |
| void | Initialize () |
| int | LoadWaterTextures () |
| LoadWaterTextures: Load water textures from within the progressive load framework. More... | |
| void | RecreateOrLoadTexturesIfNeeded () |
| Recreates/loads needed water textures. More... | |
| void | ReloadWaterNormalTextures () |
| ReloadWaterNormalTextures: Reload the normal textures so that changing water type in Atlas will actually do the right thing. More... | |
| void | UnloadWaterTextures () |
| UnloadWaterTextures: Free any loaded water textures and reset the internal state so that another call to LoadWaterTextures will begin progressive loading. More... | |
| void | RecomputeWaterData () |
| RecomputeWaterData: calculates all derived data from the waterheight. More... | |
| void | RecomputeWindStrength () |
| RecomputeWindStrength: calculates the intensity of waves. More... | |
| void | RecomputeDistanceHeightmap () |
| RecomputeDistanceHeightmap: recalculates (or calculates) the distance heightmap. More... | |
| void | CreateWaveMeshes () |
| CreateWaveMeshes: Creates the waves objects (and meshes). More... | |
| void | SetMapSize (size_t size) |
| Updates the map size. More... | |
| void | UpdateQuality () |
| Updates the settings to the one from the renderer, and sets m_NeedsReloading. More... | |
| bool | WillRenderFancyWater () const |
| Returns true if fancy water shaders will be used (i.e. More... | |
| void | RenderWaves (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CFrustum &frustrum) |
| size_t | GetCurrentTextureIndex (const double &period) const |
| Returns an index of the current texture that should be used for rendering water. More... | |
| size_t | GetNextTextureIndex (const double &period) const |
Private Attributes | |
| Renderer::Backend::IDevice * | m_Device = nullptr |
Class WaterManager: Maintain rendering-related water settings and textures Anything that affects gameplay should go in CcmpWaterManager.cpp and passed to this (possibly as copy).
| WaterManager::WaterManager | ( | Renderer::Backend::IDevice * | device | ) |
| WaterManager::~WaterManager | ( | ) |
| void WaterManager::CreateWaveMeshes | ( | ) |
CreateWaveMeshes: Creates the waves objects (and meshes).
| size_t WaterManager::GetCurrentTextureIndex | ( | const double & | period | ) | const |
Returns an index of the current texture that should be used for rendering water.
| size_t WaterManager::GetNextTextureIndex | ( | const double & | period | ) | const |
| void WaterManager::Initialize | ( | ) |
| int WaterManager::LoadWaterTextures | ( | ) |
LoadWaterTextures: Load water textures from within the progressive load framework.
| void WaterManager::RecomputeDistanceHeightmap | ( | ) |
RecomputeDistanceHeightmap: recalculates (or calculates) the distance heightmap.
| void WaterManager::RecomputeWaterData | ( | ) |
RecomputeWaterData: calculates all derived data from the waterheight.
| void WaterManager::RecomputeWindStrength | ( | ) |
RecomputeWindStrength: calculates the intensity of waves.
| void WaterManager::RecreateOrLoadTexturesIfNeeded | ( | ) |
Recreates/loads needed water textures.
| void WaterManager::ReloadWaterNormalTextures | ( | ) |
ReloadWaterNormalTextures: Reload the normal textures so that changing water type in Atlas will actually do the right thing.
| void WaterManager::RenderWaves | ( | Renderer::Backend::IDeviceCommandContext * | deviceCommandContext, |
| const CFrustum & | frustrum | ||
| ) |
| void WaterManager::SetMapSize | ( | size_t | size | ) |
Updates the map size.
Will trigger a complete recalculation of fancy water information the next turn.
| void WaterManager::UnloadWaterTextures | ( | ) |
UnloadWaterTextures: Free any loaded water textures and reset the internal state so that another call to LoadWaterTextures will begin progressive loading.
| void WaterManager::UpdateQuality | ( | ) |
Updates the settings to the one from the renderer, and sets m_NeedsReloading.
| bool WaterManager::WillRenderFancyWater | ( | ) | const |
Returns true if fancy water shaders will be used (i.e.
the hardware is capable and it hasn't been configured off)
|
private |
| std::unique_ptr<float[]> WaterManager::m_DistanceHeightmap |
| std::unique_ptr<Renderer::Backend::IFramebuffer> WaterManager::m_FancyEffectsFramebuffer |
| std::unique_ptr<Renderer::Backend::IFramebuffer> WaterManager::m_FancyEffectsOccludersFramebuffer |
| std::unique_ptr<Renderer::Backend::ITexture> WaterManager::m_FancyTexture |
| std::unique_ptr<Renderer::Backend::ITexture> WaterManager::m_FancyTextureDepth |
| CTexturePtr WaterManager::m_FoamTex |
| size_t WaterManager::m_MapSize |
| float WaterManager::m_Murkiness |
| bool WaterManager::m_NeedInfoUpdate |
| bool WaterManager::m_NeedsReloading |
| CTexturePtr WaterManager::m_NormalMap[60] |
| std::unique_ptr<Renderer::Backend::IFramebuffer> WaterManager::m_ReflectionFramebuffer |
| CMatrix3D WaterManager::m_ReflectionMatrix |
| std::unique_ptr<Renderer::Backend::ITexture> WaterManager::m_ReflectionTexture |
| std::unique_ptr<Renderer::Backend::ITexture> WaterManager::m_ReflFboDepthTexture |
| std::unique_ptr<Renderer::Backend::IFramebuffer> WaterManager::m_RefractionFramebuffer |
| CMatrix3D WaterManager::m_RefractionMatrix |
| CMatrix3D WaterManager::m_RefractionProjInvMatrix |
| std::unique_ptr<Renderer::Backend::ITexture> WaterManager::m_RefractionTexture |
| CMatrix3D WaterManager::m_RefractionViewInvMatrix |
| std::unique_ptr<Renderer::Backend::ITexture> WaterManager::m_RefrFboDepthTexture |
| size_t WaterManager::m_RefTextureSize |
| bool WaterManager::m_RenderWater |
| float WaterManager::m_RepeatPeriod |
| Renderer::Backend::IVertexInputLayout* WaterManager::m_ShoreVertexInputLayout = nullptr |
| std::vector<std::unique_ptr<WaveObject> > WaterManager::m_ShoreWaves |
| CVertexBufferManager::Handle WaterManager::m_ShoreWavesVBIndices |
| ssize_t WaterManager::m_TexSize |
| u32 WaterManager::m_updatei0 |
| u32 WaterManager::m_updatei1 |
| u32 WaterManager::m_updatej0 |
| u32 WaterManager::m_updatej1 |
| CColor WaterManager::m_WaterColor |
| bool WaterManager::m_WaterEffects |
| bool WaterManager::m_WaterFancyEffects |
| float WaterManager::m_WaterHeight |
| bool WaterManager::m_WaterRealDepth |
| bool WaterManager::m_WaterReflection |
| bool WaterManager::m_WaterRefraction |
| double WaterManager::m_WaterTexTimer |
| CTexturePtr WaterManager::m_WaterTexture[60] |
| CColor WaterManager::m_WaterTint |
| std::wstring WaterManager::m_WaterType |
| CTexturePtr WaterManager::m_WaveTex |
| float WaterManager::m_Waviness |
| float WaterManager::m_WindAngle |
| std::unique_ptr<float[]> WaterManager::m_WindStrength |