Minetest  5.4.0
GameGlobalShaderConstantSetter Class Reference
+ Inheritance diagram for GameGlobalShaderConstantSetter:
+ Collaboration diagram for GameGlobalShaderConstantSetter:

Public Member Functions

void onSettingsChange (const std::string &name)
 
void setSky (Sky *sky)
 
 GameGlobalShaderConstantSetter (Sky *sky, bool *force_fog_off, f32 *fog_range, Client *client)
 
 ~GameGlobalShaderConstantSetter ()
 
void onSetConstants (video::IMaterialRendererServices *services) override
 
- Public Member Functions inherited from IShaderConstantSetter
virtual ~IShaderConstantSetter ()=default
 
virtual void onSetMaterial (const video::SMaterial &material)
 

Static Public Member Functions

static void settingsCallback (const std::string &name, void *userdata)
 

Private Attributes

Skym_sky
 
bool * m_force_fog_off
 
f32 * m_fog_range
 
bool m_fog_enabled
 
CachedPixelShaderSetting< float, 4 > m_sky_bg_color
 
CachedPixelShaderSetting< float > m_fog_distance
 
CachedVertexShaderSetting< float > m_animation_timer_vertex
 
CachedPixelShaderSetting< float > m_animation_timer_pixel
 
CachedPixelShaderSetting< float, 3 > m_day_light
 
CachedPixelShaderSetting< float, 4 > m_star_color
 
CachedPixelShaderSetting< float, 3 > m_eye_position_pixel
 
CachedVertexShaderSetting< float, 3 > m_eye_position_vertex
 
CachedPixelShaderSetting< float, 3 > m_minimap_yaw
 
CachedPixelShaderSetting< float, 3 > m_camera_offset_pixel
 
CachedPixelShaderSetting< float, 3 > m_camera_offset_vertex
 
CachedPixelShaderSetting< SamplerLayer_tm_base_texture
 
Clientm_client
 

Constructor & Destructor Documentation

◆ GameGlobalShaderConstantSetter()

GameGlobalShaderConstantSetter::GameGlobalShaderConstantSetter ( Sky sky,
bool *  force_fog_off,
f32 *  fog_range,
Client client 
)
inline

References g_settings, Settings::getBool(), m_fog_enabled, Settings::registerChangedCallback(), and settingsCallback().

+ Here is the call graph for this function:

◆ ~GameGlobalShaderConstantSetter()

GameGlobalShaderConstantSetter::~GameGlobalShaderConstantSetter ( )
inline

References Settings::deregisterChangedCallback(), g_settings, and settingsCallback().

+ Here is the call graph for this function:

Member Function Documentation

◆ onSetConstants()

◆ onSettingsChange()

void GameGlobalShaderConstantSetter::onSettingsChange ( const std::string &  name)
inline

References g_settings, Settings::getBool(), and m_fog_enabled.

Referenced by settingsCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSky()

void GameGlobalShaderConstantSetter::setSky ( Sky sky)
inline

References m_sky.

◆ settingsCallback()

static void GameGlobalShaderConstantSetter::settingsCallback ( const std::string &  name,
void *  userdata 
)
inlinestatic

References onSettingsChange().

Referenced by GameGlobalShaderConstantSetter(), and ~GameGlobalShaderConstantSetter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_animation_timer_pixel

CachedPixelShaderSetting<float> GameGlobalShaderConstantSetter::m_animation_timer_pixel
private

Referenced by onSetConstants().

◆ m_animation_timer_vertex

CachedVertexShaderSetting<float> GameGlobalShaderConstantSetter::m_animation_timer_vertex
private

Referenced by onSetConstants().

◆ m_base_texture

CachedPixelShaderSetting<SamplerLayer_t> GameGlobalShaderConstantSetter::m_base_texture
private

Referenced by onSetConstants().

◆ m_camera_offset_pixel

CachedPixelShaderSetting<float, 3> GameGlobalShaderConstantSetter::m_camera_offset_pixel
private

Referenced by onSetConstants().

◆ m_camera_offset_vertex

CachedPixelShaderSetting<float, 3> GameGlobalShaderConstantSetter::m_camera_offset_vertex
private

Referenced by onSetConstants().

◆ m_client

Client* GameGlobalShaderConstantSetter::m_client
private

Referenced by onSetConstants().

◆ m_day_light

CachedPixelShaderSetting<float, 3> GameGlobalShaderConstantSetter::m_day_light
private

Referenced by onSetConstants().

◆ m_eye_position_pixel

CachedPixelShaderSetting<float, 3> GameGlobalShaderConstantSetter::m_eye_position_pixel
private

Referenced by onSetConstants().

◆ m_eye_position_vertex

CachedVertexShaderSetting<float, 3> GameGlobalShaderConstantSetter::m_eye_position_vertex
private

Referenced by onSetConstants().

◆ m_fog_distance

CachedPixelShaderSetting<float> GameGlobalShaderConstantSetter::m_fog_distance
private

Referenced by onSetConstants().

◆ m_fog_enabled

bool GameGlobalShaderConstantSetter::m_fog_enabled
private

◆ m_fog_range

f32* GameGlobalShaderConstantSetter::m_fog_range
private

Referenced by onSetConstants().

◆ m_force_fog_off

bool* GameGlobalShaderConstantSetter::m_force_fog_off
private

Referenced by onSetConstants().

◆ m_minimap_yaw

CachedPixelShaderSetting<float, 3> GameGlobalShaderConstantSetter::m_minimap_yaw
private

Referenced by onSetConstants().

◆ m_sky

Sky* GameGlobalShaderConstantSetter::m_sky
private

Referenced by onSetConstants(), and setSky().

◆ m_sky_bg_color

CachedPixelShaderSetting<float, 4> GameGlobalShaderConstantSetter::m_sky_bg_color
private

Referenced by onSetConstants().

◆ m_star_color

CachedPixelShaderSetting<float, 4> GameGlobalShaderConstantSetter::m_star_color
private

Referenced by onSetConstants().


The documentation for this class was generated from the following file: