72 Commits

Author SHA1 Message Date
Lars Müller
319e270664 Clean up Irrlicht matrices a bit more (#15733) 2025-02-15 12:17:30 +01:00
sfan5
45c5ef8798 Restrict relative mouse mode to Wayland users (#15697) 2025-01-26 19:16:46 +01:00
Lars Müller
8719a816e7 Fix CMatrix<T>::getScale returning negative scale (#15687) 2025-01-18 00:27:27 +01:00
sfan5
2cdf3af1b8 Reduce size of SMaterial struct 2025-01-12 14:49:25 +01:00
sfan5
4774e65ed9 Implement polygon offset in GL3 driver 2025-01-05 16:30:53 +01:00
sfan5
4e2ca05f08 Add debug mode that shows mesh buffer bounding boxes 2025-01-04 12:40:14 +01:00
SmallJoker
e8f6127779 Reduce irrlicht_extrabloated.h includes in header files 2025-01-04 12:39:34 +01:00
sfan5
1ea8763259 Clean up Irrlicht shader API 2024-12-31 14:47:46 +01:00
sfan5
d884a1624f Show active HW buffers in profiler 2024-12-31 14:47:46 +01:00
sfan5
f2b1cc3e61 Fix situation around aabbox3d default constructor (#15586)
Co-authored-by: JosiahWI <41302989+JosiahWI@users.noreply.github.com>
2024-12-29 14:36:30 +01:00
sfan5
33b8307119 OpenGL: allow uploads of buffers to hardware ahead-of-time 2024-12-24 15:27:08 +01:00
sfan5
c49ff76955 IGUIFont / CGUITTFont code cleanups (#15581) 2024-12-23 12:49:47 +01:00
sfan5
7354cbe463 Fix core::array::reallocate when shrinking 2024-12-20 15:04:08 +01:00
Lars Müller
fef28aced9 Irrlicht: Get rid of obsolete setDebugName (#15541)
Co-authored-by: sfan5 <sfan5@live.de>
2024-12-14 17:03:08 +01:00
Lars Müller
23e502fa0e Test & document conventions used by matrix4::setRotation* (#15542)
Also includes a minor `matrix4::transformVect` refactor to make testing easier.
2024-12-14 17:02:16 +01:00
Lars Müller
1e59b9a756 Refactor SkinnedMesh (#15522) 2024-12-12 15:33:08 +01:00
Lars Müller
3e10d9ccf5 Refactor: Merge [IC]SkinnedMesh into SkinnedMesh (#15511) 2024-12-06 18:03:44 +01:00
sfan5
810f39767c Move SMaterial std::hash impl to its header 2024-12-04 18:20:34 +01:00
sfan5
a799a54894 Fix some issues with mt_opengl 2024-12-04 18:20:34 +01:00
sfan5
1fb7202028 GL: fix and clean up some code 2024-12-04 18:20:34 +01:00
sfan5
36edc3f161 Add 10-bit texture format and setting to chose PP color depth
(and move some settings to the advanced category)
2024-12-04 18:20:34 +01:00
Lars Müller
d068f34753 Get rid of definitelyIdentityMatrix (#15480) 2024-11-29 12:00:09 +01:00
Christian Betancourt Dias
b63e988bd6 Fix naming conventions for CMatrix4::set(Inverse)RotationRadians() (#15204) 2024-11-19 13:38:19 +01:00
grorp
9b6a399011 Implement support for FSAA in combination with post-processing (#15392)
- Actually it's MSAA I think, or perhaps the terms are equivalent
- I've made it fit into the existing Irrlicht architecture, but that has resulted in code duplication compared to my original "hacky" approach
- OpenGL 3.2+ and OpenGL ES 3.1+ are supported
- EDT_OPENGL3 is not required, EDT_OPENGL works too
- Helpful tutorial: https://learnopengl.com/Advanced-OpenGL/Anti-Aliasing, section "Off-screen MSAA"
- This may be rough around the edges, but in general it works
2024-11-18 14:06:48 +01:00
HybridDog
7295b6c88c Remove unused and rarely used irrlicht color functions (#15442)
SColor.h contains many functions which are unused and/or perform linear
operations on non-linear 8 bit sRGB color values, such as the plus operator and
`SColor::getInterpolated()`, and there is no documentation about missing gamma
correction.
Some of these functions are not called or called only once:
* `getAverage(s16 color)`: Unused
* `SColor::getLightness()`: Unused
* `SColor::getAverage()`: Claims to determine a color's average intensity but
  calculates something significantly different since SColor represents
  non-linear sRGB values.
* `SColor::getInterpolated_quadratic()`: Claims to interpolate between colors
  but uses the sRGB color space, which is neither physically nor perceptually
  linear.
* `SColorf::getInterpolated_quadratic()`: Unused
* `SColorf::setColorComponentValue()`: Unused

Removing or inlining these functions can simplify the code and documenting
gamma-incorrect operations can reduce confusion about what the functions do.

This commit does the following:
* Remove the above-mentioned unused functions
* Inline `SColor::getAverage()` into
  `CIrrDeviceLinux::TextureToMonochromeCursor()`
* Rename `SColor::getLuminance()` into `SColor::getBrightness()` since it does
  not determine a color's luminance but calculates something which differs
  significantly from physical luminance since SColor represents non-linear sRGB
  values.
* Inline `SColor::getInterpolated_quadratic()` into `GameUI::update()`,
  where it is only used for the alpha value calculation for fading
* Document gamma-incorrect behaviour in docstrings
2024-11-18 00:02:53 +01:00
sfan5
cc8c3d501c Don't keep a copy of all texture images around 2024-11-16 16:54:22 +01:00
sfan5
58ccf0ba82 Fix some smaller issues with texture/image handling 2024-11-16 16:54:22 +01:00
sfan5
4aae31ad5e Add support for ECF_D24 texture format
and prefer it over D32 for our depth buffer, this can have performance benefits
2024-11-16 16:54:22 +01:00
sfan5
3c42cc8684 Revive texture download code and fix it on GLES 2024-11-16 16:54:22 +01:00
sfan5
11837d4623 Remove BMP image support (#15434)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-11-15 12:21:30 +01:00
sfan5
5c5538685e Don't memset SEvent directly (#15359)
Fixes a compiler warning by manually zeroing the tag and the largest union member instead
2024-10-31 19:24:43 +01:00
sfan5
aa273119f2 Irrlicht: Use EGL over GLX (#15286) 2024-10-22 23:04:46 +02:00
DS
e5d321d286 Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
grorp
9f43018df2 Better UX when touch events aren't supported by Irrlicht device (#15288) 2024-10-16 21:37:00 +02:00
Lars Mueller
06907aa99b Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
Lars Mueller
d8274af670 Refactor global inversed matrix usage (+ minor fix)
Thanks to GreenXenith and Josiah for spotting a bug here
2024-10-10 21:39:57 +02:00
Lars Mueller
224066c1d3 Implement glTF texture wrapping support 2024-10-10 21:02:05 +02:00
Lars Mueller
7e4919c6ed Refactor matrix4.h
Sets the surprising row-major conventions used here straight.

Renames rotateVect to rotateAndScaleVect:
If the matrix also scales, that is applied as well by the method.
Obsolete rotateVect variants are removed.
The inverseRotateVect method is also renamed accordingly.
Note that this applies the transpose of the product
of the scale and rotation matrices, which inverts just the rotation.
2024-10-10 17:40:31 +02:00
grorp
4952f17df4 Auto-toggle TouchControls in-game when receiving touch/mouse input 2024-10-09 18:26:19 +02:00
sfan5
3c5f05b284 Don't expose irrlicht internal headers as public 2024-10-09 16:25:02 +02:00
swagtoy
05cbd84ae0 Fix irrString use-after-free with char-like assignment (operator=) 2024-10-04 10:45:09 +02:00
grorp
3eef1ca28f Fix incorrect SMaterial::operator!= (regression from #15165) (#15226) 2024-10-03 11:37:14 +02:00
swagtoy
c6fc694ea6 Fix deletePathFromFilename returning cutoff filenames (#15211) 2024-09-30 22:41:53 +02:00
Desour
e3efaa1733 Move irr_ptr.h too irr/include/ 2024-09-18 12:19:40 +02:00
grorp
70e169f165 Drop fixed pipeline lighting stuff (#15165) 2024-09-18 12:18:28 +02:00
sfan5
58ea11c2b3 Add some debug helpers around this area 2024-09-16 23:12:52 +02:00
Gregor Parzefall
2208fc0632 Move Minetest GUISkin -> Irrlicht CGUISkin 2024-09-08 13:53:33 +02:00
sfan5
3feec87d52 Count global number of drawcalls too 2024-09-08 13:53:23 +02:00
sfan5
e55fb6da71 Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
sfan5
3fb4049612 Prevent accidentally copy/move of refcounted objects 2024-09-02 21:50:13 +02:00