Commit Graph

489 Commits

Author SHA1 Message Date
Vitaliy
5b81694b1d
CI: Android support (#197) 2024-01-21 15:51:11 +01:00
grorp
66786d0059
Make IrrlichtDevice::isWindowVisible do what it says on the tin (#279) 2024-01-19 18:17:26 +01:00
David Heidelberg
9df2f0b944 Undefine SDL2 DirectFB video driver
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>
2024-01-18 23:28:45 +01:00
sfan5
c3571261ca Fix build with OpenGL ES 1 2024-01-17 17:55:19 +01:00
sfan5
bdcd27ab5b Bump revision 1.9.0mt14 2024-01-17 17:19:03 +01:00
savilli
345285786f Make vector comparison operators transitive 2024-01-17 17:09:46 +01:00
savilli
dda9b23c3d Make equals method symmetric 2024-01-17 17:09:46 +01:00
sfan5
b349266855 Enable SDL to compile on macOS 2024-01-17 11:00:40 +01:00
sfan5
ee2467d622 Remove some dead code 2024-01-16 23:59:46 +01:00
sfan5
88ca26c418 Define extpointer for SDL + OGLES2 2024-01-16 20:23:23 +01:00
sfan5
8f44270e4a Rip out compressed color formats 2024-01-16 20:23:23 +01:00
jordan4ibanez
edc678f995
Update minimum CMake version 2024-01-16 18:48:30 +01:00
Lars Müller
0faeea33c3
build.yml: Upgrade bionic/jammy -> focal (current oldest LTS) 2024-01-16 18:34:24 +01:00
sfan5
f86b9b93e8 Fix crash when SDL context fails to create 2024-01-16 18:24:02 +01:00
Lars Mueller
a3ec3a88e8 Fix scene nodes not dropping meshes (memleak) 2024-01-13 18:13:04 +01:00
Gregor Parzefall
7df45b4cf3 SDL: Implement touchscreen support 2024-01-13 14:08:13 +01:00
sfan5
a2b6244f54 Fix build with older SDL2 2024-01-08 23:51:34 +01:00
Lars Müller
3983c29645
Optimize scene node child removal to constant time (#275) 2024-01-08 18:43:24 +01:00
David Heidelberg
73e62f8676 Keep RTTI for Minetest IPO/LTO
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>
2024-01-06 21:30:15 +01:00
HybridDog
fb4ee6ac93 Fix mip map size calculation for non-square textures
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`.
2024-01-05 14:09:50 +01:00
Muhammad Rifqi Priyo Susanto
91e4129615
Windows: Return early if the clipboard data is not Unicode text 2024-01-04 21:24:50 +01:00
grorp
54b82aad26
Add IrrlichtDevice::isWindowVisible for Android 2024-01-04 16:48:35 +01:00
sfan5
03dd8b0336 Update vendored khrplatform.h 2023-12-19 22:56:31 +01:00
sfan5
6e6b4a6f3c Fix some minor issues with GL loader
fixes #258
2023-12-19 22:56:31 +01:00
sfan5
0110826ce9 Resync mt_opengl_loader.cpp with BindingGenerator.lua
also add a warning that you can't edit it by hand
2023-12-19 22:56:31 +01:00
sfan5
4e52d547b2 MinGW toolchain refresh 2023-12-17 20:47:29 +01:00
Vitaliy
9a439a3646
Use SDL2 by default
Except on Android and macOS, for now
2023-12-17 18:46:08 +01:00
Josiah VanderZee
854e97f57c Add size_t to u32/s32 static_casts in irrArray
This fixes 5 narrowing cast warnings from Visual Studio 17 2022.
2023-12-17 17:02:22 +01:00
Josiah VanderZee
22f2c37322 Add size_t to u32 static_casts to irrString
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.
2023-12-17 17:02:22 +01:00
paradust7
94cb0cc19d
Use KHRONOS_APIENTRY to fix win32 crash 2023-12-17 17:00:41 +01:00
sfan5
9b52d6fb0d Hash-check windows CI dependencies 2023-12-13 12:17:54 +01:00
sfan5
16a99c2079 Add a file to gitignore 2023-12-13 12:17:04 +01:00
paradust7
bb7c06d32a Initialize X11 thread safety 2023-12-10 16:29:22 +01:00
Muhammad Rifqi Priyo Susanto
a2884e4000
Android: Make ALooper_pollAll call always non-blocking (#255) 2023-11-30 15:52:04 +01:00
sfan5
b284ea076b Use newer vcpkg in Windows CI 2023-11-30 15:43:24 +01:00
numzero
85081d6fe0 Fix off-by-one error in the TGA RLE decompressor 2023-11-01 14:40:11 +01:00
numzero
eafc282efd Add unit tests for image loaders 2023-11-01 14:40:11 +01:00
numzero
8c2ad025b1 Add CTest 2023-11-01 14:40:11 +01:00
numzero
a07cfc0f7a Require C++17 at the top level 2023-11-01 14:40:11 +01:00
sfan5
f725b68c57 Remove irrUString.h
now unused
2023-10-31 10:10:31 +01:00
sfan5
99be15f40b Bump revision 1.9.0mt13 2023-10-27 17:48:29 +02:00
sfan5
6fccc79270 Convert built-in font to PNG 2023-10-25 16:54:43 +02:00
Loic Blot
7cade6f27f cleanup: remove _IRR_COMPILE_ANDROID_ASSET_READER_ build flag
it's enabled inconditionally on android

also remove some _IRR_COMPILE_WITH_ANDROID_DEVICE_ which are useless because cmake is already properly configured
2023-10-22 12:19:14 +02:00
Loic Blot
ae63f1bf02 build: drop _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
it's enabled inconditionally
2023-10-22 12:19:14 +02:00
Loic Blot
dd14486d3f cleanup: replace remaining #ifndef #define with #pragma once 2023-10-22 12:19:14 +02:00
cutealien
4a7d3de89a Merging r6555 through r6560 from branch releases/1.8 to trunk
- Fixing buffer overflow in tga loader

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6561 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-21 17:27:11 +02:00
cutealien
631c0fa77b Add warning about rotateXZBy using right handed rotation
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
2023-10-15 13:54:48 +02:00
cutealien
9813b460e1 Fix number overflows in TGA loader causing crashes
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
2023-10-15 13:54:39 +02:00
cutealien
565f14677c Fix crash caused by memory overwriting in TGA loader caused by bad RLE data
From sfan5's fuzzing test reported in Minetest here: https://github.com/minetest/irrlicht/issues/236
Was missing test if it writes beyond allocated memory which can be triggered by TGA's which lie in their RLE data.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6534 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:54:24 +02:00
cutealien
f53af0f2cf TGA images with palettes in 24 or 32 bit now create 32 bit images
Was creating 16-bit images for those before.
Could also support 24-bit images, but either we need another convert function or another palette for that (the 16 and 32 bit both work with 32 bit palettes, the 24 bit conversion function only with 24 bit palettes)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6533 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:54:21 +02:00