1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-12-19 13:25:47 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
sfan5
0062f82fc0 Fix fog disable in OpenGL3 renderer 2025-11-23 21:18:07 +01:00
SmallJoker
36c261c1f0 IrrlichtMt: Initial SDL3 support (#16583)
This commit implements support for SDL3, more specifically, >= 3.2.0 (the first released version).
Almost all changes were made according to https://github.com/libsdl-org/SDL/blob/release-3.2.10/docs/README-migration.md?plain=1 and the suggestions provided by `SDL3/SDL_oldnames.h`.
2025-11-17 20:55:52 +01:00
grorp
fcd96e9244 Dynamic shadows with the ogles2 driver on OpenGL ES 3.0+ (#16661) 2025-11-17 17:55:13 +01:00
sfan5
c3790dd7af Introduce EMT_INVALID as safe placeholder 2025-11-09 18:26:17 +01:00
sfan5
298a27c743 Port most shaders to GLSL ES 3.0 (#16639) 2025-11-06 19:31:35 +01:00
sfan5
8042b5512f Irrlicht: remove some dead code 2025-11-05 11:56:05 +01:00
sfan5
de5ef4ca29 Introduce array textures for node rendering (#16574) 2025-11-01 17:21:41 +01:00
sfan5
3c60b348a6 Irrlicht: expose MaxArrayTextureLayers 2025-10-30 15:19:26 +01:00
SmallJoker
9213b7f164 Driver: Handle errors during texture creation (#16565)
The OpenGL drivers do accept 'nullptr' textures, however the
recent Mip-Mapping change did not respect that.
Furthermore, errors during texture creation for the pipeline are
now properly handled and shown as an error to the user.
2025-10-11 19:38:38 +02:00
SmallJoker
024e1d2d27 IrrlichtMt: Implement mip-mapping for RTTs (#16434)
This can be helpful to draw fonts memory-efficiently at varying scales.

Adds ETCF_CREATE_RTT_MIP_MAPS to generate mip-maps on request.
2025-09-04 18:58:23 +02:00
sfan5
079169612d Fix Irrlicht snprintf problems and UB in my_string_to_double 2025-08-24 19:01:18 +02:00
sfan5
b1cb5fcb9f Improve texture creation logging and checking 2025-08-08 13:42:36 +02:00
Lucas OH
93dd22b901 Clean up unused Forward Declarations (#16324) 2025-08-02 10:07:45 +02:00
Lars Müller
61551cfc3a Remove irr namespace (#16309) 2025-07-09 10:35:52 +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
Lars Mueller
e1143783e5 Fix some (MSVC) compiler warnings 2025-04-20 20:49:10 +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
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
sfan5
4b85062caf Improve robustness of GL object handling 2025-03-14 11:52:52 +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
9554e3d43a Add support for glObjectLabel to aid debugging 2025-01-04 12:40:14 +01:00
sfan5
8c52d5f2dd Implement LODBias in GL3 driver
(currently unused)
2024-12-31 14:47:46 +01:00
sfan5
1ea8763259 Clean up Irrlicht shader API 2024-12-31 14:47:46 +01:00
sfan5
40afc84597 Replace data structure for HW buffer book-keeping
before
  time in endScene ÷ num hw buf ________________  199x   0.128
after
  time in endScene ÷ num hw buf ________________  199x   0.057
2024-12-31 14:47:46 +01:00
SmallJoker
35bc217ba8 IrrlichtMt: Move OpenGL 3+ transformation matrix to shaders (#15591)
This replaces annoying calculations on C++-side and eases the
implementation of 2D geometry batch rendering a lot.
2024-12-28 22:04:05 +01:00
sfan5
d2a7875b5b Group sparse mesh buffers over entire scene for rendering 2024-12-24 15:27:08 +01:00
sfan5
bb550158fc OpenGL: encapsulate VBOs into a class
internal only for now but this will be handy
2024-12-24 15:27: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
sfan5
1fb7202028 GL: fix and clean up some code 2024-12-04 18:20:34 +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
sfan5
8d2e770361 Minor corrections in gl3/gles2 drivers 2024-11-16 16:54:22 +01:00
SmallJoker
4838eb2f7d Non-SDL: Add opengl3 support 2024-11-15 12:18:48 +01:00
grorp
70e169f165 Drop fixed pipeline lighting stuff (#15165) 2024-09-18 12:18:28 +02:00
sfan5
6f275e2ba0 Remove dead code in COpenGL3MaterialBaseCB 2024-09-16 23:12:52 +02:00
sfan5
e90ef85e7d Fix texture matrix handling in our shaders 2024-09-07 14:23:37 +02:00
sfan5
6b7fc1e9fe Handle vertex & index VBOs separately in GL drivers 2024-09-02 21:50:13 +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
1F616EMO~nya
53a50e0b0d Fix warning about getVertexTypeDescription reaching its end (#14806) 2024-08-12 15:34:25 +02:00
Lars Müller
5c187363b2 Fix some clang compiler warnings (#14654)
* Fix some clang compiler warnings

* Get rid of sdl_supports_primary_selection

* Fix draw2DImage hiding overloaded virtual function
2024-05-15 19:56:25 +02:00
sfan5
6303334cc2 Deduplicate GL extension detection 2024-05-12 14:20:34 +02:00
sfan5
472742266b Fix invalid glDrawBuffer call on GLES
closes #14445
2024-05-12 14:20:34 +02:00
sfan5
38cacfa577 Try to fix macro definition order problem with OpenGL code 2024-04-15 19:27:05 +02:00
sfan5
13e271c6cb Improve error checks in COpenGL3DriverBase 2024-04-15 17:48:33 +02:00
sfan5
7a6ca85081 Expose OpenGL debugging as a normal setting 2024-04-15 17:48:33 +02:00
Gregor Parzefall
07fdf7158d Migrate the Android port to SDL2 2024-04-08 20:15:37 +02:00
import
f638482fba Copy irrlichtmt to <root>/irr/ 2024-03-26 21:39:02 +01:00