Commit Graph

49 Commits

Author SHA1 Message Date
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
sfan5
62131fe295 Put all pieces together and clean up leftover code 2024-09-02 21:50:13 +02:00
sfan5
6b7fc1e9fe Handle vertex & index VBOs separately in GL drivers 2024-09-02 21:50:13 +02:00
sfan5
be9aa19208 Propagate changes to IMeshBuffer parent class 2024-09-02 21:50:13 +02:00
sfan5
435a89b5a4 Apply same changes to SSkinMeshBuffer 2024-09-02 21:50:13 +02:00
sfan5
47e4c33a50 Split CIndexBuffer from CMeshBuffer 2024-09-02 21:50:13 +02:00
sfan5
5d6e15bc49 Split CVertexBuffer from CMeshBuffer 2024-09-02 21:50:13 +02:00
JosiahWI
ac11a14509
Add static glTF support (#14557)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: jordan4ibanez <jordan4ibanez@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-09-02 14:50:30 +02:00
SmallJoker
efd7792add
Debloat IVideoDriver and IrrlichtDevice includes (#15080)
As the project grows, compile time will not go down unless the header mess
is cleaned up one by one to only include exactly what's needed.
2024-08-31 11:44:30 +02:00
sfan5
bf4d31227b
Delete OpenGL ES 1.0 driver (#15067) 2024-08-28 20:44:42 +02:00
sfan5
fa4529b4f1 Keep stats on hw buffer uploads 2024-08-28 15:38:02 +02:00
sfan5
5d226268df
Irrlicht cleanups (mostly getting rid of core::array)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-08-17 19:49:11 +02:00
grorp
4c001bd248
Make button sprites (scrollbar arrows) DPI-aware (#14772) 2024-06-26 15:25:27 +02:00
grorp
a9cca5e76c
SDL2: Support highdpi (#14703)
and handle DPI changes at runtime
2024-06-16 17:49:42 +02:00
sfan5
71893807b3
Call malloc_trim() regularly to improve deallocation behavior (#14707) 2024-06-07 16:57:30 +02:00
Lars Müller
ec9c000be9
Fix scrolling in scroll containers (#14702) 2024-06-03 20:38:09 +02:00
grorp
833bb542fc
Allow toggling fullscreen without restart and add keybind (#14714) 2024-06-02 21:05:16 +02:00
sfan5
7a6ca85081 Expose OpenGL debugging as a normal setting 2024-04-15 17:48:33 +02:00
sfan5
30e280b694 Use MT's string conversion inside Irrlicht 2024-04-10 15:31:59 +02:00
sfan5
b9adf244e5 Simplify Irrlicht CMake for static linking
removes any dynamic linking capability, which will stop being possible soon anyway.
2024-04-10 15:31:59 +02:00
Gregor Parzefall
07fdf7158d Migrate the Android port to SDL2 2024-04-08 20:15:37 +02:00
sfan5
d53ef90a73 Remove Irrlicht versioning 2024-03-27 20:55:48 +01:00
import
f638482fba Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00