22#ifndef INCLUDED_WATERMANAGER
23#define INCLUDED_WATERMANAGER
Definition: Matrix3D.h:34
Definition: VertexBufferManager.h:49
Definition: IDeviceCommandContext.h:42
Class WaterManager: Maintain rendering-related water settings and textures Anything that affects game...
Definition: WaterManager.h:48
void RenderWaves(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CFrustum &frustrum)
Definition: WaterManager.cpp:895
std::unique_ptr< Renderer::Backend::ITexture > m_FancyTextureDepth
Definition: WaterManager.h:73
float m_Murkiness
Definition: WaterManager.h:129
std::unique_ptr< Renderer::Backend::IFramebuffer > m_FancyEffectsFramebuffer
Definition: WaterManager.h:114
size_t m_MapSize
Definition: WaterManager.h:66
std::unique_ptr< Renderer::Backend::IFramebuffer > m_ReflectionFramebuffer
Definition: WaterManager.h:113
bool m_WaterRefraction
Definition: WaterManager.h:93
void RecreateOrLoadTexturesIfNeeded()
Recreates/loads needed water textures.
Definition: WaterManager.cpp:216
Renderer::Backend::IDevice * m_Device
Definition: WaterManager.h:212
size_t m_RefTextureSize
Definition: WaterManager.h:109
std::unique_ptr< Renderer::Backend::IFramebuffer > m_FancyEffectsOccludersFramebuffer
Definition: WaterManager.h:115
float m_WindAngle
Definition: WaterManager.h:130
CTexturePtr m_FoamTex
Definition: WaterManager.h:70
void RecomputeWaterData()
RecomputeWaterData: calculates all derived data from the waterheight.
Definition: WaterManager.cpp:966
void RecomputeWindStrength()
RecomputeWindStrength: calculates the intensity of waves.
Definition: WaterManager.cpp:978
size_t GetCurrentTextureIndex(const double &period) const
Returns an index of the current texture that should be used for rendering water.
Definition: WaterManager.cpp:1148
void CreateWaveMeshes()
CreateWaveMeshes: Creates the waves objects (and meshes).
Definition: WaterManager.cpp:500
bool WillRenderFancyWater() const
Returns true if fancy water shaders will be used (i.e.
Definition: WaterManager.cpp:1141
u32 m_updatej1
Definition: WaterManager.h:81
CColor m_WaterColor
Definition: WaterManager.h:126
std::unique_ptr< Renderer::Backend::ITexture > m_RefrFboDepthTexture
Definition: WaterManager.h:75
~WaterManager()
Definition: WaterManager.cpp:108
std::unique_ptr< Renderer::Backend::IFramebuffer > m_RefractionFramebuffer
Definition: WaterManager.h:112
bool m_RenderWater
Definition: WaterManager.h:83
CTexturePtr m_WaveTex
Definition: WaterManager.h:69
void RecomputeDistanceHeightmap()
RecomputeDistanceHeightmap: recalculates (or calculates) the distance heightmap.
Definition: WaterManager.cpp:473
WaterManager(Renderer::Backend::IDevice *device)
Definition: WaterManager.cpp:72
float m_RepeatPeriod
Definition: WaterManager.h:104
CColor m_WaterTint
Definition: WaterManager.h:127
std::unique_ptr< Renderer::Backend::ITexture > m_ReflFboDepthTexture
Definition: WaterManager.h:74
void ReloadWaterNormalTextures()
ReloadWaterNormalTextures: Reload the normal textures so that changing water type in Atlas will actua...
Definition: WaterManager.cpp:393
bool m_WaterRealDepth
Definition: WaterManager.h:89
CTexturePtr m_WaterTexture[60]
Definition: WaterManager.h:50
size_t GetNextTextureIndex(const double &period) const
Definition: WaterManager.cpp:1154
void Initialize()
Definition: WaterManager.cpp:130
bool m_NeedInfoUpdate
Definition: WaterManager.h:99
CTexturePtr m_NormalMap[60]
Definition: WaterManager.h:51
std::unique_ptr< float[]> m_WindStrength
Definition: WaterManager.h:54
u32 m_updatei0
Definition: WaterManager.h:78
Renderer::Backend::IVertexInputLayout * m_ShoreVertexInputLayout
Definition: WaterManager.h:64
bool m_WaterReflection
Definition: WaterManager.h:95
std::vector< std::unique_ptr< WaveObject > > m_ShoreWaves
Definition: WaterManager.h:60
bool m_NeedsReloading
Definition: WaterManager.h:97
u32 m_updatei1
Definition: WaterManager.h:80
std::wstring m_WaterType
Definition: WaterManager.h:125
void SetMapSize(size_t size)
Updates the map size.
Definition: WaterManager.cpp:1096
int LoadWaterTextures()
LoadWaterTextures: Load water textures from within the progressive load framework.
Definition: WaterManager.cpp:166
CMatrix3D m_RefractionViewInvMatrix
Definition: WaterManager.h:122
CMatrix3D m_RefractionProjInvMatrix
Definition: WaterManager.h:121
float m_Waviness
Definition: WaterManager.h:128
ssize_t m_TexSize
Definition: WaterManager.h:67
double m_WaterTexTimer
Definition: WaterManager.h:103
void UnloadWaterTextures()
UnloadWaterTextures: Free any loaded water textures and reset the internal state so that another call...
Definition: WaterManager.cpp:412
float m_WaterHeight
Definition: WaterManager.h:101
std::unique_ptr< Renderer::Backend::ITexture > m_FancyTexture
Definition: WaterManager.h:72
std::unique_ptr< Renderer::Backend::ITexture > m_RefractionTexture
Definition: WaterManager.h:108
CMatrix3D m_RefractionMatrix
Definition: WaterManager.h:120
bool m_WaterFancyEffects
Definition: WaterManager.h:91
bool m_WaterEffects
Definition: WaterManager.h:86
u32 m_updatej0
Definition: WaterManager.h:79
void UpdateQuality()
Updates the settings to the one from the renderer, and sets m_NeedsReloading.
Definition: WaterManager.cpp:1112
std::unique_ptr< Renderer::Backend::ITexture > m_ReflectionTexture
Definition: WaterManager.h:107
std::unique_ptr< float[]> m_DistanceHeightmap
Definition: WaterManager.h:56
CVertexBufferManager::Handle m_ShoreWavesVBIndices
Definition: WaterManager.h:62
CMatrix3D m_ReflectionMatrix
Definition: WaterManager.h:119
std::shared_ptr< CTexture > CTexturePtr
Definition: Texture.h:23
Definition: WaterManager.cpp:65
uint32_t u32
Definition: types.h:39
intptr_t ssize_t
Definition: wposix_types.h:82