60 Commits

Author SHA1 Message Date
MoNTE48
d4c34bfe75 Backport MT5 hasNPotSupport() 2020-04-26 19:19:15 +02:00
Maksim
fadbfebcfa Mobile: disable Npot for non-Npot tiles only in height 2020-04-13 19:42:38 +02:00
MoNTE48
69ec9421f7 Mobile: minor changes 2020-02-29 17:14:30 +01:00
MoNTE48
550519dc1d Try to fix iOS memory leak when working with large textures such as background 2020-02-07 23:38:01 +01:00
MoNTE48
5da5114308 Android: temporary aarch64 fix. Move font size it constants, minor cleanup 2019-07-17 19:59:20 +02:00
MoNTE48
06b1df684f Fix merging, Android: newest irrlicht 2019-05-03 21:32:07 +02:00
MoNTE48
e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
Loïc Blot
43badddb5e Fix a crash on Android with Align2Npot2 (#8070)
* Fix a crash on Android with Align2Npot2

glGetString can be NULL. If stored in a string it triggers a SIGSEGV.
Instead do a basic strstr and verify the pointer
* Better Align2Npot2 check (+ performance)
2019-01-07 17:05:54 +01:00
MoNTE48
3d8c088230 Rename touch crack texture 2018-08-09 21:31:47 +02:00
Lars Hofhansl
a5eab716ba Do not scale texture unless necessary.
This avoids scaling textures to 'texture_min_size' unless it is actually
required (because either auto-scaling or bi/trilinear filtering is enabled)
2018-06-03 17:32:00 +02:00
Maksim Gamarnik
35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
you
753c131b3c Do not create dummy normalmaps (#4180)
fixes #1811
2017-05-19 08:08:12 +02:00
Loic Blot
87140349e4 Remove an unused variable in Android Build 2017-04-17 09:37:12 +02:00
Loïc Blot
2924109eba Android progressbar fix (#5601)
* 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-16 14:44:15 +02:00
Dániel Juhász
88b956fe8e Hardware coloring for itemstacks
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-04-08 18:39:15 -07:00
SmallJoker
7d76bb6a75 Tile.cpp: Fix MSVC build broken by 072bbba 2017-03-24 20:05:15 +01:00
Loïc Blot
e011d331db 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
Auke Kok
c57a68f09c Prevent SIGFPE on entity tile loading issue. (#5178)
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-02-05 23:59:18 -08:00
sapier
9e3f66ec6b Add multiply texture modifier
Allows colorizing of textures using a color multiplication method.
2017-01-30 16:37:17 +00:00
Maksim Gamarnik
e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
Dániel Juhász
d5a0b5283e Add hardware node coloring. Includes:
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-23 07:27:12 +01:00
Luke Puchner-Hardman
c83a1e6c5f Added "[sheet" to the texture special commands.
"[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.
2017-01-02 15:28:06 +01:00
sfan5
a3448cca81 Irrlicht 1.9 support 2016-12-26 22:36:22 +01:00
sfan5
d525673848 iOS changed files (#41) 2016-11-06 00:14:16 +02:00
Thomas--S
d2c8230ea1 Add an [invert:<mode> texture modifier
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-15 05:25:38 +01:00
sfan5
4fa9d44956 Allow escaping of texture names when passed as an argument to a modifier 2016-09-14 09:19:36 +01:00
Thomas--S
a75fb2191a Add an [opacity:<r> texture modifier. Makes the base image transparent 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-08-12 15:20:30 +02:00
Maksim Gamarnik
b771d4a9f8 Update to Minetest 0.4.14 2016-05-15 16:30:09 +03:00
SmallJoker
4daf22d7fe Add [resize texture modifier Resizes the texture to the given dimensions. 2016-05-09 20:48:42 +02:00
Maksim Gamarnik
582cce1a00 Merge latest code 2016-05-07 23:40:31 +03:00
Maksim Gamarnik
d5854e5cf7 Merge minetest commits / WIP!
Java part WIP, pls, use prev commits!
2016-04-29 10:11:25 +03:00
SmallJoker
6569e39099 tile.cpp: Automatically upscale lower resolution texture 2016-04-25 06:39:32 +01:00
Maksim Gamarnik
2bc88a95a4 Part I 2016-04-18 22:40:42 +03:00
Maksim Gamarnik
6d3bdc5a7d Merge 2016-04-12 21:28:50 +03:00
kwolekr
6c25042ba1 Re-add and disable blit_with_interpolate_overlay 2016-04-07 04:01:43 -04:00
Samuel Sieb
d8f57d0561 Fix compiler warnings from "Add an option to colorize to respect the destination alpha"
Fix warnings added by commit 01ae43c48009f816f4649fae2f7f6997452aa6cf

Fixes #3952
2016-04-06 00:36:24 +02:00
Samuel Sieb
b378092691 Add an option to colorize to respect the destination alpha
Also, rework the colorizing code to be more efficient.
2016-04-03 04:24:28 -04:00
Maksim Gamarnik
edb4cab692 Merge release 2016-03-28 20:08:34 +03:00
Maksim Gamarnik
f56e578960 Merge remote-tracking branch 'upstream1/master' 2016-03-21 01:45:56 +02:00
Maksim Gamarnik
0b7bd78343 Minor update Android, light, remove pageflip, other 2016-03-21 01:38:25 +02:00
ShadowNinja
3592feb875 Clean up Strfnd
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.
2016-03-19 21:27:57 -04:00
Maksim Gamarnik
919be490f9 Update
Sync all Minetest commits
2015-11-10 13:49:24 +02:00
kwolekr
5b30bbcc23 Refactor thread utility interface
- Add "thr_" prefix to thread utility functions
- Compare threadid_ts in a portable manner, where possible
2015-10-16 22:20:24 -04:00
David Jones
9d1284b324 Change i++ to ++i 2015-08-25 18:33:52 -04:00
ShadowNinja
098d28aa5e Clean up threading
* 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-23 22:04:06 -04:00
RealBadAngel
5f0aa06221 Remove use of engine sent texture tiling flags - theyre no longer needed 2015-08-20 02:41:40 +02:00
Maksim Gamarnik
9247f32e0e LGPL 2.1 to 3.0 on all files 2015-08-14 01:26:28 +03:00
Břetislav Štec
a20f64d877 src/client/tile.cpp: Fix reference counting 2015-08-02 19:26:15 +02:00
RealBadAngel
35f96637dc Add wielded (and CAOs) shader 2015-07-21 23:56:41 +02:00
RealBadAngel
dd9ca2e7ed Fix relief mapping issues 2015-07-16 15:36:48 +02:00