#include "clientmap.h"
#include "client.h"
#include "client/mesh.h"
#include "mapblock_mesh.h"
#include <IMaterialRenderer.h>
#include <IVideoDriver.h>
#include <matrix4.h>
#include "mapsector.h"
#include "mapblock.h"
#include "nodedef.h"
#include "profiler.h"
#include "settings.h"
#include "camera.h"
#include "util/basic_macros.h"
#include "util/tracy_wrapper.h"
#include "client/renderingengine.h"
#include <queue>
Classes | |
class | MapBlockFlags |
class | MapBlockFlags::Chunk |
Functions | |
static void | on_settings_changed (const std::string &name, void *data) |
template<typename F > | |
static u32 | transformBuffersToDrawOrder (const MeshBufListMaps::MeshBufList &src, DrawDescriptorList &draw_order, F get_world_pos, CachedMeshBuffers &dynamic_buffers) |
Copy a list of mesh buffers into the draw order, while potentially merging some. | |
static bool | getVisibleBrightness (Map *map, const v3f &p0, v3f dir, float step, float step_multiplier, float start_distance, float end_distance, const NodeDefManager *ndef, u32 daylight_factor, float sunlight_min_d, int *result, bool *sunlight_seen) |
Variables | |
static const std::string | ClientMap_settings [] |
|
static |
References BS, CONTENT_IGNORE, dir(), floatToInt(), MapNode::getContent(), MapNode::getLight(), MapNode::getLightBlend(), NodeDefManager::getLightingFlags(), Map::getNode(), ContentLightingFlags::has_light, LIGHT_SUN, LIGHTBANK_DAY, p(), and ContentLightingFlags::sunlight_propagates.
Referenced by ClientMap::getBackgroundBrightness().
|
static |
|
static |
Copy a list of mesh buffers into the draw order, while potentially merging some.
src | buffer list |
dst | draw order |
get_world_pos | returns translation for a buffer |
dynamic_buffers | cache structure for merged buffers |
This is a tradeoff between time spent merging buffers and time spent due to excess drawcalls. Testing has shown that the ideal value is in the low hundreds, as extra CPU work quickly eats up the benefits (though alleviated by a cache). In MTG landscape scenes this was found to save around 20-40% of drawcalls.
NOTE: if you attempt to test this with quicktune, it won't give you valid results since HW buffers stick around and Irrlicht handles large amounts inefficiently.
References Profiler::avg(), g_profiler, g_settings, RenderingEngine::get_video_driver(), Settings::getU32(), MYMIN, and U16_MAX.
Referenced by ClientMap::renderMap(), and ClientMap::renderMapShadows().
|
static |
Referenced by ClientMap::ClientMap().