Minetest  0.4.16
drawscene.cpp File Reference
#include "drawscene.h"
#include "settings.h"
#include "clouds.h"
#include "clientmap.h"
#include "util/timetaker.h"
#include "fontengine.h"
#include "guiscalingfilter.h"
#include "filesys.h"
+ Include dependency graph for drawscene.cpp:

Enumerations

enum  paralax_sign { LEFT = -1, RIGHT = 1, EYECOUNT = 2 }
 

Functions

void draw_anaglyph_3d_mode (Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv)
 
void init_texture (video::IVideoDriver *driver, const v2u32 &screensize, video::ITexture **texture, const char *name)
 
video::ITexture * draw_image (const v2u32 &screensize, paralax_sign psign, const irr::core::matrix4 &startMatrix, const irr::core::vector3df &focusPoint, bool show_hud, video::IVideoDriver *driver, Camera &camera, scene::ISceneManager *smgr, Hud &hud, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, const video::SColor &skycolor)
 
video::ITexture * draw_hud (video::IVideoDriver *driver, const v2u32 &screensize, bool show_hud, Hud &hud, Client &client, bool draw_crosshair, video::SColor skycolor, gui::IGUIEnvironment *guienv, Camera &camera)
 
void draw_interlaced_3d_mode (Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
 
void draw_sidebyside_3d_mode (Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
 
void draw_top_bottom_3d_mode (Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
 
void draw_pageflip_3d_mode (Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
 
int scaledown (int coef, int size)
 
void draw_plain (Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
 
void draw_scene (video::IVideoDriver *driver, scene::ISceneManager *smgr, Camera &camera, Client &client, LocalPlayer *player, Hud &hud, Minimap *mapper, gui::IGUIEnvironment *guienv, const v2u32 &screensize, const video::SColor &skycolor, bool show_hud, bool show_minimap)
 
void draw_load_screen (const std::wstring &text, IrrlichtDevice *device, gui::IGUIEnvironment *guienv, ITextureSource *tsrc, float dtime, int percent, bool clouds)
 

Enumeration Type Documentation

◆ paralax_sign

Enumerator
LEFT 
RIGHT 
EYECOUNT 

Function Documentation

◆ draw_anaglyph_3d_mode()

void draw_anaglyph_3d_mode ( Camera camera,
bool  show_hud,
Hud hud,
video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv 
)

References Hud::drawSelectionMesh(), Camera::drawWieldedTool(), g_settings, Camera::getCameraNode(), Settings::getFloat(), and guienv.

Referenced by draw_scene().

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

◆ draw_hud()

video::ITexture* draw_hud ( video::IVideoDriver *  driver,
const v2u32 screensize,
bool  show_hud,
Hud hud,
Client client,
bool  draw_crosshair,
video::SColor  skycolor,
gui::IGUIEnvironment *  guienv,
Camera camera 
)

References Hud::drawCrosshair(), Hud::drawHotbar(), Hud::drawLuaElements(), Camera::drawNametags(), Camera::getOffset(), Client::getPlayerItem(), guienv, and init_texture().

Referenced by draw_sidebyside_3d_mode(), and draw_top_bottom_3d_mode().

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

◆ draw_image()

video::ITexture* draw_image ( const v2u32 screensize,
paralax_sign  psign,
const irr::core::matrix4 &  startMatrix,
const irr::core::vector3df &  focusPoint,
bool  show_hud,
video::IVideoDriver *  driver,
Camera camera,
scene::ISceneManager *  smgr,
Hud hud,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv,
const video::SColor &  skycolor 
)

References Hud::drawSelectionMesh(), Camera::drawWieldedTool(), g_settings, Camera::getCameraNode(), Settings::getFloat(), guienv, init_texture(), and RIGHT.

Referenced by draw_interlaced_3d_mode(), draw_sidebyside_3d_mode(), and draw_top_bottom_3d_mode().

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

◆ draw_interlaced_3d_mode()

void draw_interlaced_3d_mode ( Camera camera,
bool  show_hud,
Hud hud,
video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
const v2u32 screensize,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv,
video::SColor  skycolor 
)

References draw_image(), Hud::drawSelectionMesh(), Camera::drawWieldedTool(), g_settings, Camera::getCameraNode(), Settings::getFloat(), guienv, and LEFT.

Referenced by draw_scene().

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

◆ draw_load_screen()

void draw_load_screen ( const std::wstring &  text,
IrrlichtDevice *  device,
gui::IGUIEnvironment *  guienv,
ITextureSource tsrc,
float  dtime,
int  percent,
bool  clouds 
)

References porting::device, draw2DImageFilterScaled(), g_fontengine, g_menuclouds, g_menucloudsmgr, g_settings, Settings::getBool(), FontEngine::getLineHeight(), ITextureSource::getTexture(), FontEngine::getTextWidth(), porting::getWindowSize(), guienv, rangelim, Clouds::render(), and Clouds::step().

Referenced by Client::afterContentReceived(), Game::getServerContent(), Game::showOverlayMessage(), and texture_update_progress().

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

◆ draw_pageflip_3d_mode()

void draw_pageflip_3d_mode ( Camera camera,
bool  show_hud,
Hud hud,
video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
const v2u32 screensize,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv,
video::SColor  skycolor 
)

References Hud::drawHotbar(), Hud::drawLuaElements(), Camera::drawNametags(), Hud::drawSelectionMesh(), Camera::drawWieldedTool(), errorstream, g_settings, Camera::getCameraNode(), Settings::getFloat(), Camera::getOffset(), Client::getPlayerItem(), and guienv.

Referenced by draw_scene().

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

◆ draw_plain()

void draw_plain ( Camera camera,
bool  show_hud,
Hud hud,
video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
const v2u32 screensize,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv,
video::SColor  skycolor 
)

References Hud::drawSelectionMesh(), Camera::drawWieldedTool(), g_settings, Settings::getU16(), init_texture(), and scaledown().

Referenced by draw_scene().

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

◆ draw_scene()

void draw_scene ( video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
Camera camera,
Client client,
LocalPlayer player,
Hud hud,
Minimap mapper,
gui::IGUIEnvironment *  guienv,
const v2u32 screensize,
const video::SColor &  skycolor,
bool  show_hud,
bool  show_minimap 
)

◆ draw_sidebyside_3d_mode()

void draw_sidebyside_3d_mode ( Camera camera,
bool  show_hud,
Hud hud,
video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
const v2u32 screensize,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv,
video::SColor  skycolor 
)

References draw2DImageFilterScaled(), draw_hud(), draw_image(), Camera::getCameraNode(), guienv, LEFT, and RIGHT.

Referenced by draw_scene().

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

◆ draw_top_bottom_3d_mode()

void draw_top_bottom_3d_mode ( Camera camera,
bool  show_hud,
Hud hud,
video::IVideoDriver *  driver,
scene::ISceneManager *  smgr,
const v2u32 screensize,
bool  draw_wield_tool,
Client client,
gui::IGUIEnvironment *  guienv,
video::SColor  skycolor 
)

References draw2DImageFilterScaled(), draw_hud(), draw_image(), Camera::getCameraNode(), guienv, LEFT, and RIGHT.

Referenced by draw_scene().

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

◆ init_texture()

void init_texture ( video::IVideoDriver *  driver,
const v2u32 screensize,
video::ITexture **  texture,
const char *  name 
)

Referenced by draw_hud(), draw_image(), and draw_plain().

+ Here is the caller graph for this function:

◆ scaledown()

int scaledown ( int  coef,
int  size 
)
inline

Referenced by draw_plain().

+ Here is the caller graph for this function: