aboutsummaryrefslogtreecommitdiff
path: root/src/client/tile.cpp
AgeCommit message (Collapse)Author
2018-09-29Software inventorycube (#7651)Vitaliy
Fixes missing/upside-down images on Android.
2018-03-11Android build fixes for c++11stujones11
2018-03-10Drop texture file list cache (#6660)Vitaliy
2017-11-17Load files from subfolders in texturepacksnumber Zero
Updated and rebased version of a PR by red-001
2017-11-04Do not scale texture unless necessary.Lars Hofhansl
This avoids scaling textures to 'texture_min_size' unless it is actually required (because either auto-scaling or bi/trilinear filtering is enabled)
2017-10-15Real global textures (#6105)Vitaliy
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
2017-08-19Code modernization: subfolders (#6283)Loïc Blot
* Code modernization: subfolders Modernize various code on subfolders client, network, script, threading, unittests, util * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Make connection.cpp readable in a pointed place + typo
2017-08-15Modernize client code (#6250)Loïc Blot
* Various code style fixes * Use range based for loops * Use empty instead of empty objects * Use C++11 default keyword for trivial constructors and destructors * Drop some useless casts * Use emplace_back instead of push_back to improve performance of some vectors push
2017-06-26Isolate irrlicht references and use a singleton (#6041)Loïc Blot
* Add Device3D class which will contain IrrlichtDevice interface move getSupportedVideoDrivers to Device3D Add Device3D singleton & use it in various places Rename Device3D to Rendering engine & add helper functions to various device pointers More singleton work RenderingEngine owns draw_load_screen move draw functions to RenderingEngine Reduce IrrlichtDevice exposure and guienvironment RenderingEngine: Expose get_timer_time() to remove device from guiEngine Make irrlichtdevice & scene manager less exposed * Code style fixes * Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly * enum paralax => enum parallax
2017-06-11Remove threads.h and replace its definitions with their C++11 equivalents ↵ShadowNinja
(#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures.
2017-06-06Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot
* Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-19Do not create dummy normalmaps (#4180)you
fixes #1811
2017-04-17Remove an unused variable in Android BuildLoic Blot
2017-04-16Android progressbar fix (#5601)Loïc Blot
* Fix progressbar for Android Fixes #5599 Fixed #5403 * draw_load_screen: use texturesource this permits to unify texture loading code * scale progress bar * Add gl version check for GL_OES_texture_npot. This fixed the texture on loading screen * Remove two sanity checks pointed by @celeron55 * sfan5 comments + android ratio fixes
2017-04-08Hardware coloring for itemstacksDániel Juhász
Adds the possibility to colorize item stacks based on their metadata. In the item/node definition you can specify palette (an image file) and color (fallback color if the item has no palette or metadata). Then you can add palette_index to the metadata. Dropped itemstacks with different colors do not merge.
2017-03-24Tile.cpp: Fix MSVC build broken by 072bbbaSmallJoker
2017-03-22Some performance optimizations (#5424)Loïc Blot
* 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-02-05Prevent SIGFPE on entity tile loading issue. (#5178)Auke Kok
While experimenting with entities I ran into this unresolvable error where the server is sending some texture that the client crashes on. The crash prevents the client from ever reconnecting, resulting in a server that has to use clearobjects. We shouldn't crash but just ignore the object and move on. ``` 0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh", baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744 1744 u32 xscale = scaleto / dim.Width; (gdb) bt #0 0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh", baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744 ``` After reconnecting, the client now can connect without issues and displays an error message: ``` ERROR[Main]: generateImagePart(): Illegal 0 dimension for part_of_name="[applyfiltersformesh", cancelling. ERROR[Main]: generateImage(): Failed to generate "[applyfiltersformesh" ERROR[Main]: Irrlicht: Invalid size of image for OpenGL Texture. ```
2017-01-30Add multiply texture modifiersapier
Allows colorizing of textures using a color multiplication method.
2017-01-23Add hardware node coloring. Includes:Dániel Juhász
- Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-02Added "[sheet" to the texture special commands.Luke Puchner-Hardman
"[sheet:WxH:X,Y" assumes the base image is a tilesheet with W*H tiles on it and crops to the tile at position X,Y. Basically it works like "[verticalframe" but in 2D. For testing, I combined the four default_chest images into one.
2016-12-26Irrlicht 1.9 supportsfan5
2016-09-15Add an [invert:<mode> texture modifierThomas--S
Inverts the given channels of the base image. Mode may contain the characters "r", "g", "b", "a". Only the channels that are mentioned in the mode string will be inverted.
2016-09-14Allow escaping of texture names when passed as an argument to a modifiersfan5
2016-08-12Add an [opacity:<r> texture modifier. Makes the base image transparent ↵Thomas--S
according to the given ratio. r must be between 0 and 255. 0 means totally transparent. 255 means totally opaque. Useful for texture overlaying.
2016-05-09Add [resize texture modifier Resizes the texture to the given dimensions.SmallJoker
2016-04-25tile.cpp: Automatically upscale lower resolution textureSmallJoker
2016-04-07Re-add and disable blit_with_interpolate_overlaykwolekr
2016-04-06Fix compiler warnings from "Add an option to colorize to respect the ↵Samuel Sieb
destination alpha" Fix warnings added by commit 01ae43c48009f816f4649fae2f7f6997452aa6cf Fixes #3952
2016-04-03Add an option to colorize to respect the destination alphaSamuel Sieb
Also, rework the colorizing code to be more efficient.
2016-03-19Clean up StrfndShadowNinja
Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
2015-10-16Refactor thread utility interfacekwolekr
- Add "thr_" prefix to thread utility functions - Compare threadid_ts in a portable manner, where possible
2015-08-25Change i++ to ++iDavid Jones
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-08-20Remove use of engine sent texture tiling flags - theyre no longer neededRealBadAngel
2015-08-02src/client/tile.cpp: Fix reference countingBřetislav Štec
2015-07-21Add wielded (and CAOs) shaderRealBadAngel
2015-07-16Fix relief mapping issuesRealBadAngel
2015-06-27Add minimap featureRealBadAngel
2015-04-26Fix fast leaves with texture_clean_transparent enabled.Aaron Suen
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-04-01Clean scaling pre-filter for formspec/HUD.Aaron Suen
2015-03-31Move texture_min_size even further down the pipe. Now, textures are ↵Aaron Suen
JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements.
2015-03-23Fix for sun/moon tonemaps: don't upscale 1px images.Aaron Suen
2015-03-22Fix composite textures with texture_min_size. Moved upscaling of textures to ↵Aaron Suen
later in the process, when images are converted to textures, instead of right after image load, so the original image is unmodified for generateImagePart.
2015-03-20Configurable automatic texture scaling and filtering at load time.Aaron Suen
Signed off by: Zeno, kwolekr
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-05Replace std::list to std::vector into tile.cpp (m_texture_trash) and move ↵Loic Blot
tile.hpp to src/client/