1. we don't need it
2. it's dropped in SDL 3
3. it breaks compilation on Alpine and postmarketOS with SDL2 enabled
(and the bug never going to get fixed on SDL2 side)
Signed-off-by: David Heidelberg <david@ixit.cz>
Minetest using RTTI, so we cannot apply the flag here
if we want to start using IPO/LTO.
If we keep `-fno-rtti` here, compiler loses part of informations and
cannot do efficient optimizations.
The benefit of using RTTI on Irrlicht disappears with IPO/LTO on whole binary.
Signed-off-by: David Heidelberg <david@ixit.cz>
The size of a mip map is `max{floor(width / 2 ^ level), 1} x max{floor(height / 2 ^ level), 1}`,
where `width x height` is the size of the full-resolution image,
`level` is the integer mip map level
and the smallest mip map has `1 x 1` resolution.
If `regenerateMipMapLevels` is called with custom mip map data,
the mip map sizes are calculated in this function and separately in `uploadTexture`.
`uploadTexture` calculates a size by `floor(width / 2 ^ level) x floor(height / 2 ^ level)`.
To support non-square textures, after this change,
`uploadTexture` sets the mip map width or height to `1` if it is `0`.
The irrString implementation doesn't allow constructing a string with a
size that would exceed a u32, so it should be safe to narrow the size of
the underlying STL container back to a u32.
This fixes 5 narrowing cast warnings from Visual Studio 17 2022.
it's enabled inconditionally on android
also remove some _IRR_COMPILE_WITH_ANDROID_DEVICE_ which are useless because cmake is already properly configured
Rest of Irrlicht is using left-handed rotatations.
But 2d vector rotations all uses ccw which is kinda the same direction as this one if you consider those as rotations around Y, so I guess that was maybe the reason back then.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6536 dfc29bdd-3216-0410-991c-e03cc46cb475
Image size calculation could overflow s32 in one place (but not others where it was done correct), which first lead to wrong amount of memory getting allocated for image data and later crash in the CColorConverter.
Thanks @sfan5 for his fuzzing tests @https://github.com/minetest/irrlicht/issues/236
and @erlehmann for passing them on: https://irrlicht.sourceforge.io/forum/viewtopic.php?t=52925
Also updating changes.txt with TGA loader changes from this and previous commits.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6535 dfc29bdd-3216-0410-991c-e03cc46cb475