Commit Graph

17 Commits

Author SHA1 Message Date
paramat
ad9fcf859e Set sky API: Add bool for clouds in front of custom skybox
Default true.
Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API.
Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of
'm_visible' (whether normal sky is visible).
2017-05-02 20:42:35 -07:00
Loic Blot
f7088f69ab
Clang-format: fix some header files and remove them from whitelist 2017-04-07 08:50:17 +02:00
Loïc Blot
072bbba69a Some performance optimizations (#5424)
* Some performance optimizations

This is globally removing some memory useless copy

* use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it
 * pass some stack created strings to static const as they are not modified anywhere
 * Camera: return nametags per const ref instead of a list pointer, we only need to read it
 * INodeDefManager: getAll should be a result ref writer instead of a return copy
 * INodeDefManager: getAlias should return a const std::string ref
 * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop)
 * CNodeDefManager::updateAliases: prevent a idef getall copy
 * Profiler: constness
 * rollback_interface: create real_name later, and use const ref
 * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction,
 * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec
 * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
2017-03-22 21:41:02 +01:00
nerzhul
fefa148d69 v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
Kahrl
e80a044818 Fix use of uninit data in Sky and (potentially) GUIChatConsole constructors
Clean up nearby code a bit

As a small side effect, it is now possible to add a background texture
to the chat console by simply providing background_chat.jpg, it is no
longer necessary to also add "console_color =" to minetest.conf.
2015-01-18 13:16:01 +01:00
Craig Robbins
076c5ee223 Various uninitialised variable fixes
sky.cpp: m_bgcolor.getAlpha() was being used before initialised

mesh related: m_highlight_mesh_color was being used uninitialised
2014-10-19 15:33:08 +02:00
sapier
09970b7b6d Add support for interlaced polarized 3d screens
Add (experimental) support for topbottom as well as sidebyside 3d mode
2014-05-18 01:08:13 +02:00
RealBadAngel
f20267862f Textureable sun and moon. 2014-04-21 22:00:16 +02:00
Sfan5
118e2ae865 Fix all warnings reported by clang 2014-04-15 21:34:53 +02:00
Perttu Ahola
86a6cca3cf Add player:set_sky() with simple skybox support 2014-02-01 18:34:26 +01:00
sapier
c120ea57c9 Add setting to disable direction dependent fog and sky colors 2013-12-15 15:30:02 +01:00
MirceaKitsune
848f80b2e5 Directional fog + horizon colors, based on sun & moon positions at sunrise / sunset 2013-12-15 14:28:50 +01:00
Sfan5
6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola
9f031a6759 Optimize headers 2012-06-17 04:03:39 +03:00
Perttu Ahola
037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola
2e90ed07ac Dynamic sky, fog and cloud colors; sun and moon 2012-03-18 13:42:18 +02:00