1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
Commit graph

182 commits

Author SHA1 Message Date
Miguel P.L
49f48e0a7c
Update links and names in the documentation (#16153) 2025-06-22 22:04:42 +02:00
Lars Müller
fde6384a09
Fix and clean up skeletal animation (#15722)
* Fix attachments lagging behind their parents (#14818)
* Fix animation blending (#14817)
* Bring back cool guy as another .x smoke test
* Add .x mesh loader unittest
* Do bounding box & matrix calculation at proper point in time
* Remove obsolete `SAnimatedMesh`
2025-06-01 23:21:35 +02:00
sfan5
1214a1d4a6
Refactor ITextureSource use in main menu (#16135) 2025-05-24 22:49:29 +02:00
Lars Müller
7ac5502fdf
Fix handling of skinned meshes for nodes
Second try after the revert in 8a28339 due to an unexpected regression.

- Rigidly animated models (e.g. the glTF frog node) were not working correctly,
  since cloning the mesh ignored the transformation matrices.
  Note that scaling the mesh needs to occur *after* transforming the vertices.
- Visual scale did not apply to skinned models,
  as resetting the animation overwrote scaled vertex data with static positions & normals.
  For backwards compatibility, we now apply a 10x scale to static, non-glTF models.

We now do scale static meshes, as the bug that caused meshes not to be scaled was limited to skeletally animated meshes,
hence we ought not to reproduce it for skinned meshes that do not take advantage of skeletal animations (e.g. current MTG doors).

However, glTF models (e.g. Wuzzy's eyeballs) up until recently were always affected due to technical reasons
(using skeletal animation for rigid animation).

Thus, to preserve behavior, we:

1. Do not apply 10x scale to glTF models.
2. Apply 10x scale to obj models.
3. Apply 10x scale to static x or b3d models, but not to animated ones.

See also: #16141
2025-05-20 18:37:33 +02:00
siliconsniffer
9b2ee1dd5d
Remove Irrlicht GUI gradients (#16015)
Co-authored-by: rollerozxa <rollerozxa@voxelmanip.se>
Co-authored-by: grorp <grorp@posteo.de>
2025-05-07 08:56:00 +02:00
Lars Müller
f4285a59ac
Purge some dead code (mostly Irrlicht) (#16111)
* Remove obsolete Irrlicht attributes system

* Remove dead GUI element types

* Remove some obsolete Irrlicht headers

* Fix some oopsies from d96f5e1
2025-05-04 16:31:44 +02:00
sfence
0bdd5f294e
Make SDL2 default on macOS (#16039) 2025-05-02 21:28:13 +02:00
Lars Mueller
01e4395977 glTF: Clean up rigid animation 2025-04-26 16:15:05 +02:00
Lars Mueller
5113fcaedd Fix glTF reader not ignoring parent transforms for skinned meshes 2025-04-26 16:15:05 +02:00
Lars Mueller
e1143783e5 Fix some (MSVC) compiler warnings 2025-04-20 20:49:10 +02:00
Lars Mueller
695d526764 Get rid of _IRR_OVERRIDE_ macro 2025-04-20 20:49:10 +02:00
Lars Mueller
5f1ff453c9 Replace _IRR_DEBUG_BREAK_IF with assertions 2025-04-20 20:49:10 +02:00
y5nw
c1d2124102
SDL: Send events for X1 and X2 mouse buttons (#16025) 2025-04-20 20:20:33 +02:00
y5nw
bf15036831
Show SDL version in the About tab (#16046) 2025-04-20 20:20:22 +02:00
sfan5
04e82749db Make ETLF_FLIP_Y_UP_RTT work for texture download on GLES 2025-04-15 21:42:47 +02:00
sfan5
cf07b56235 Expand workarounds for format inconsistency with BGRA8888 extension on GLES
fixes #16011
2025-04-15 21:42:47 +02:00
sfan5
a00b9cab36
Fix operator[] for vector2d and vector3d being potentially UB (#15977)
We don't have a C++ expert on hand, but taking a pointer to one member
and expecting to access another by an offset is very fishy:
- for one, there could theoretically be padding
- the compiler might assume that we are only writing to that first member

The new code has shown to be free for constant parameter values.
Non-constant ones cause the assembly to have branches (why?), but we don't
use that much.
2025-04-08 22:25:45 +02:00
sfan5
46db688cc8 Implement support for array textures in GL driver
note: feature detection was not implemented in the legacy driver, but the code itself probably works.
2025-04-08 22:24:37 +02:00
sfan5
d5bf094f9a Prefer immutable texture storage when available 2025-04-08 22:24:37 +02:00
sfan5
427a7e4998 Split texture initialization code from upload 2025-04-08 22:24:37 +02:00
sfan5
9ff07df45e Fix GLES texture download to handle mipmaps and cubemap type 2025-04-08 22:24:37 +02:00
sfan5
38c3876c4e Drop support for storing mipmap data alongside IImage 2025-04-08 22:24:37 +02:00
sfan5
03affa1bbb Some minor code cleanups 2025-04-08 22:24:37 +02:00
Lars Müller
a3648b0b16
Add spatial index for objects (#14631) 2025-04-08 08:44:53 +02:00
sfan5
785c042f1f Drop gzip support from CZipReader
This allowed reading concatenated gzip-compressed files as if they were an archive.
Aside from being generally uncommon we literally don't need this.
2025-03-30 18:17:19 +02:00
sfan5
89e3bc8d56 Improve std::hash<SMaterial> implementation 2025-03-30 18:17:19 +02:00
SmallJoker
95d6008332
IrrlichtMt: Fix orientation of IRenderTarget-textures (#15932)
Textures created through a render target are flipped along the X axis.
For the same reason, screenshots must be flipped back as well ('IVideoDriver::createScreenShot').

This commit implements the same flipping concept in two places:
1. Batch rendering of images (mostly used by fonts/text)
2. In-world rendering of such textures
2025-03-26 18:32:23 +01:00
y5nw
cc65c8bd70
SDL: Use scancodes for keybindings (#14964)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2025-03-16 20:35:34 +01:00
sfan5
4b85062caf Improve robustness of GL object handling 2025-03-14 11:52:52 +01:00
sfan5
7892541383 Various random code cleanups 2025-03-04 19:53:01 +01:00
sfan5
7abaa8d4cd Make Irrlicht identity material const 2025-03-04 19:53:01 +01:00
sfan5
7602308835 Revert "Restrict relative mouse mode to Wayland users (#15697)"
see #15761
SDL is the only device that supports relative mode and
mouse input is actually somewhat broken if it's *not* enabled.

This reverts commit 45c5ef8798
and 88b007907a.
2025-03-04 19:53:01 +01:00
Lars Mueller
90121dc66f Fix & improve glTF loader matrix decomposition 2025-02-27 12:31:04 +01:00
Lars Mueller
d74af2f1a7 Use matrix4::getRotationRadians 2025-02-27 12:31:04 +01:00
Lars Mueller
b6c71b2379 Improve matrix4::getRotationDegrees a bit, radians 2025-02-27 12:31:04 +01:00
sfan5
22c81e5292 Print if sdl2-compat is in use 2025-02-26 12:21:57 +01:00
sfan5
5a8720a484 Change material sharing for CMeshSceneNode 2025-02-22 16:19:04 +01:00
DS
0890125962
SDL Irr device: Ignore +-0.0f y mouse wheel events (#15815)
our code often assumes that it's non-zero, e.g.: `event.MouseInput.Wheel < 0 ? -1 : 1`
2025-02-22 16:17:07 +01:00
Lars Müller
319e270664
Clean up Irrlicht matrices a bit more (#15733) 2025-02-15 12:17:30 +01:00
sfan5
d015944f6c Revert "Disable SDL2 for 5.11.0"
This reverts commit 29cfb6efff.
2025-02-15 12:14:12 +01:00
Stefan Beller
63e9b01f7d COSOperator: Use NSPasteboardTypeString instead of NSStringPboardType
According to https://developer.apple.com/documentation/appkit/nsstringpboardtype?language=objc
we can replace it with NSPasteboardTypeString:

> In apps that adopt App Sandbox, use an NSURL object, a bookmark, or a
> filename pasteboard type instead. In a nonsandboxed app, you can also
> use the NSPasteboardTypeString pasteboard type.
2025-02-01 13:41:17 +01:00
sfan5
29cfb6efff
Disable SDL2 for 5.11.0 (#15704)
see #14545
2025-01-26 19:18:18 +01:00
sfan5
45c5ef8798
Restrict relative mouse mode to Wayland users (#15697) 2025-01-26 19:16:46 +01:00
sfan5
b5e084c9a5
Update github URL references (#15705) 2025-01-24 16:50:39 +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
cosin15
37899f7a14
Fix CFileSystem::FileSystemType related UB (#15669) 2025-01-11 16:42:36 +01:00
DS
431c5c8b36
Fix wireframe mode in opengl3 driver (#15626)
`GL_LINES` isn't suitable, because it makes lines between pairs of 2 vertices,
not loops around 3 vertices.
Support for OpenGL ES isn't simple, as it has no `glPolygonMode`. And showing broken
wireframe (i.e. with `GL_LINES`) would cause confusion.
2025-01-06 19:39:17 +01:00
sfan5
4774e65ed9 Implement polygon offset in GL3 driver 2025-01-05 16:30:53 +01:00
sfan5
0614b175b5 Optimize draw3DBox generic case 2025-01-04 12:40:14 +01:00