205 Commits

Author SHA1 Message Date
dd1043c4c0 Replace non-leading tabs with spaces, using:
find -type f |  # list all regular files
  grep -E '\.(h|cpp|mm)$' |  # filter for source files
  grep -v '/mt_' |  # filter out generated files
  grep -v '/vendor/' | # and vendored GL
  xargs -n 1 -P $(nproc) ./replace_non_leading_tabs.lua  # reformat everything
2024-03-21 22:08:26 +01:00
adc96072cd Fix ugly formatted arrays
Found via: `rg --multiline "=\n\t*\{\n"`
2024-03-21 22:08:26 +01:00
b01a3ea781 Fix ifs clang-format didn’t get 2024-03-21 22:08:26 +01:00
f5c6d3e945 Reformat the code, using:
find -type f |  # list all regular files
  grep -E '\.(h|cpp|mm)$' |  # filter for source files
  grep -v '/mt_' |  # filter out generated files
  grep -v '/vendor/' | # and vendored GL
  grep -v '/test/image_loader_test.cpp' |  # and this file (has giant literals arrays)
  xargs -n 1 -P $(nproc) clang-format -i  # reformat everything

Co-authored-by: numzero <numzer0@yandex.ru>
2024-03-21 22:08:26 +01:00
a9c4683b18 Do not include core::string in matrix4.h 2024-03-17 23:25:45 +01:00
9d07f906a7 Delete mesh writing support entirely
CB3DMeshWriter.cpp was not even being compiled
2024-03-10 10:11:27 +01:00
d26c0aeaaf Remove more dead code 2024-03-09 23:00:33 +01:00
70b0b46d50 Delete deprecated video driver methods 2024-03-09 23:00:33 +01:00
a7dd075dec Mark some common constructors and other stuff as constexpr 2024-03-09 22:05:06 +01:00
1e89db1b80 Consistently include C headers by their C++ wrapper 2024-02-25 22:10:04 +01:00
44a368ef0e Migrate public headers to #pragma once 2024-02-25 22:10:04 +01:00
7ddf740f9b Remove unused includes in public headers 2024-02-25 22:10:04 +01:00
270b2bec6e Ensure that std::abs is used and not integer abs 2024-02-21 23:25:52 +01:00
c83f28431b Add API to delete shader materials 2024-02-21 21:53:38 +01:00
e60921f0cb Drop old shader material functions
I'm not sure what these actually are, but the situation is the same as the last commit.
2024-02-21 21:53:38 +01:00
92252f70d2 Drop low-level shader constant setters
These don't work on the modern drivers and are unused anyway.
2024-02-21 21:53:38 +01:00
4e9d0db4be Delete a broken method
implementation commented out, lol?
2024-02-19 21:22:54 +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
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
f1504093d1 Ensure that absent bone names work (#284) 2024-02-06 20:22:44 +01:00
66786d0059 Make IrrlichtDevice::isWindowVisible do what it says on the tin (#279) 2024-01-19 18:17:26 +01:00
bdcd27ab5b Bump revision 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
8f44270e4a Rip out compressed color formats 2024-01-16 20:23:23 +01:00
3983c29645 Optimize scene node child removal to constant time (#275) 2024-01-08 18:43:24 +01:00
54b82aad26 Add IrrlichtDevice::isWindowVisible for Android 2024-01-04 16:48:35 +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
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
94cb0cc19d Use KHRONOS_APIENTRY to fix win32 crash 2023-12-17 17:00:41 +01:00
f725b68c57 Remove irrUString.h
now unused
2023-10-31 10:10:31 +01:00
99be15f40b Bump revision 2023-10-27 17:48:29 +02:00
dd14486d3f cleanup: replace remaining #ifndef #define with #pragma once 2023-10-22 12:19:14 +02:00
631c0fa77b Add warning about rotateXZBy using right handed rotation
Rest of Irrlicht is using left-handed rotatations.
But 2d vector rotations all uses ccw which is kinda the same direction as this one if you consider those as rotations around Y, so I guess that was maybe the reason back then.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6536 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:54:48 +02:00
fbdc4ee8d5 Optimization in quaternion::rotationFromTo from Robert Eisele
Turns out we can avoid a square root and a division.
Patch comes even with proof: https://raw.org/proof/quaternion-from-two-vectors
(I also tested it a while and indeed got same results)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6511 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:47:43 +02:00
2c086e5fdc Improve documentation
What Irrlicht calls ShaderConstants is called uniforms by everyone else. So let's mention this at least.
Also reworked setVertexShaderConstant interface had an example for the old interface in the header.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6497 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:45:50 +02:00
627a3a5172 Spelling fixes
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6475 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:39:42 +02:00
c2dd664fc6 CIrrDeviceWin32::yield() now uses Sleep(0) instead of Sleep(1).
We had changed that once before in the other direction in svn r421
Reason back then was "Sleep(0) doesn't allow any lower priority threads to execute"
But Microsoft changed the behaviour of Sleep(0) after Windows XP so that's no longer true.
And the costs of it is pretty high - due to this using a timer with a 15ms resolutions it meant not just giving up the thread but it also always waited for 15ms on Windows.
I also replaced a few sleep calls in examples for that reason with yield() calls.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6459 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:37:26 +02:00
774d3d6d2b Spelling fixes
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6458 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:36:47 +02:00
e1f41edd29 Spelling fixes
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6456 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-10-15 13:36:22 +02:00
c766c3a023 Fix character encoding conversion issues 2023-10-15 12:59:40 +02:00
93eebed8c9 Unify documentation between IOSOperator and COSOperator 2023-10-15 12:59:40 +02:00
9954667c45 Cleanup line endings (#245)
The exact commands to make this commit were:

git reset --hard origin/master
find -type f |  # list all regular files
  grep -E '\.(h|cpp|fsh|vsh|mm)|LICENSE$' |  # filter for text files
  xargs -n 1 -P $(nproc) sed -i 's:\s*$::'  # for each file, trim trailing whitespace including the CR
git commit -a
2023-10-03 20:37:00 +02:00
ea1b58387e ComboBox API additions for minetest#13814
- Allow reliably detecting when the user opens a combobox.
- Allow preventing comboboxes from opening.
- Allow sending a combobox change event.
2023-09-30 16:46:30 +02:00
d8a21cb25f Drop unused CIndexBuffer 2023-09-20 20:43:33 +02:00
9c54d927b9 Drop unused CVertexBuffer 2023-09-20 20:43:33 +02:00
03fd4ff533 Remove unused IVideoDriver::getTextureByIndex and IVideoDriver::renameTexture
* getTextureByIndex is pretty useless (apart from iterating over all texture,
  which we don't do), as you can't get an id.
* renameTexture is broken anyway: The sort call does nothing because the array
  is still flagged as sorted.
2023-09-13 13:24:08 +02:00