Commit Graph

510 Commits

Author SHA1 Message Date
2bb2d3fe01 CFileSystem: Fix signed integer conversion on MinGW 2024-02-18 23:45:39 +01:00
45ace61007 OpenGL: support scene::EHM_STREAM
the relevant enum value is defined in both gl3 and gles2
2024-02-18 22:43:25 +01:00
89d0717779 Delete some dead code 2024-02-18 17:12:51 +01:00
19819bd23a Reduce needless use of wchar / stringw 2024-02-18 17:12:51 +01:00
2894d9ab03 Add debug output to GL shader loading 2024-02-18 17:12:51 +01:00
e56605d7ce Update README for new SDL status 2024-02-17 22:15:02 +01:00
f91be59811 Remove support for GL_POINT_SMOOTH and GL_LINE_SMOOTH antialiasing
These antialiasing techniques have been removed in OpenGL 3.1, they were often executed by the CPU, and Minetest does not use them.
The OpenGL wiki recommends that we do not use this functionality in our program.
https://www.khronos.org/opengl/wiki/Multisampling#Smooth_antialiasing
2024-02-17 22:04:01 +01:00
0069837920 Upgrade CI actions (#290)
* update ci package versions to resolve warnings
* fix bug with duplicate package names under msvc
2024-02-17 21:07:25 +01:00
ad96fabe4a Remove mistaken code block from OGLES1 driver
Version can never be 200 here, this was probably mistakenly copy-pasted from the OpenGL driver.
2024-02-17 21:01:15 +01:00
6ba6118b8c Upgrade SDL CI to 22.04 everywhere
fed up with stuff not working for random reasons.
2024-02-16 22:42:49 +01:00
7f11d2f950 Switch to llvm-mingw 2024-02-16 21:30:07 +01:00
fe3e41e7ea Set minimum SDL version
It was determined that the touch/mouse hints only exist in this version.
Since it's from 2019 this should be a reasonable minimum.
2024-02-15 10:37:24 +01:00
4478b1f1ec Remove old SDL Windows workaround
suggested by @waxtatect
2024-02-15 10:35:21 +01:00
3992129735 Bind keypad enter on SDL
fixes https://github.com/minetest/minetest/issues/14170
2024-02-15 10:34:23 +01:00
0dab737d60 Do not use core::max_() with variable that can not be addressed
header struct is packed, and `core::max_()` takes the input as reference.
2024-02-12 16:31:10 +01:00
330150854b SDL: set default for ActiveIcon
getActiveIcon() may be called before ActiveIcon
is initialized, leading to undefined behavior.
2024-02-12 16:31:10 +01:00
6779ac83f9 SDL: Improve handling of IMEs (#285)
* Set text input rectangle for IMEs
* Avoid unnecessarily "restarting" text input
2024-02-09 00:08:03 +01:00
f1504093d1 Ensure that absent bone names work (#284) 2024-02-06 20:22:44 +01:00
8482cc3db8 Adjust package config dependency again
Predictably, this broke dynamic linking setups where
SDL is not available at build-time (it doesn't need to be).
2024-01-30 14:23:33 +01:00
a4f94b7656 Add missing dependency find to package config
refer to <https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html#creating-a-package-configuration-file>
2024-01-28 01:06:17 +01:00
4299ee21d8 CMake: Move generator conditional expressions (#281) 2024-01-22 09:50:29 +01:00
5b81694b1d CI: Android support (#197) 2024-01-21 15:51:11 +01:00
66786d0059 Make IrrlichtDevice::isWindowVisible do what it says on the tin (#279) 2024-01-19 18:17:26 +01:00
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
c3571261ca Fix build with OpenGL ES 1 2024-01-17 17:55:19 +01:00
bdcd27ab5b Bump revision 1.9.0mt14 2024-01-17 17:19:03 +01:00
345285786f Make vector comparison operators transitive 2024-01-17 17:09:46 +01:00
dda9b23c3d Make equals method symmetric 2024-01-17 17:09:46 +01:00
b349266855 Enable SDL to compile on macOS 2024-01-17 11:00:40 +01:00
ee2467d622 Remove some dead code 2024-01-16 23:59:46 +01:00
88ca26c418 Define extpointer for SDL + OGLES2 2024-01-16 20:23:23 +01:00
8f44270e4a Rip out compressed color formats 2024-01-16 20:23:23 +01:00
edc678f995 Update minimum CMake version 2024-01-16 18:48:30 +01:00
0faeea33c3 build.yml: Upgrade bionic/jammy -> focal (current oldest LTS) 2024-01-16 18:34:24 +01:00
f86b9b93e8 Fix crash when SDL context fails to create 2024-01-16 18:24:02 +01:00
a3ec3a88e8 Fix scene nodes not dropping meshes (memleak) 2024-01-13 18:13:04 +01:00
7df45b4cf3 SDL: Implement touchscreen support 2024-01-13 14:08:13 +01:00
a2b6244f54 Fix build with older SDL2 2024-01-08 23:51:34 +01:00
3983c29645 Optimize scene node child removal to constant time (#275) 2024-01-08 18:43:24 +01:00
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
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
91e4129615 Windows: Return early if the clipboard data is not Unicode text 2024-01-04 21:24:50 +01:00
54b82aad26 Add IrrlichtDevice::isWindowVisible for Android 2024-01-04 16:48:35 +01:00
03dd8b0336 Update vendored khrplatform.h 2023-12-19 22:56:31 +01:00
6e6b4a6f3c Fix some minor issues with GL loader
fixes #258
2023-12-19 22:56:31 +01:00
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
4e52d547b2 MinGW toolchain refresh 2023-12-17 20:47:29 +01:00
9a439a3646 Use SDL2 by default
Except on Android and macOS, for now
2023-12-17 18:46:08 +01:00
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
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