Commit Graph

  • a2b6244f54 Fix build with older SDL2 sfan5 2024-01-08 23:51:34 +01:00
  • 3983c29645
    Optimize scene node child removal to constant time (#275) Lars Müller 2024-01-08 18:43:24 +01:00
  • 73e62f8676 Keep RTTI for Minetest IPO/LTO David Heidelberg 2024-01-01 19:10:12 +01:00
  • fb4ee6ac93 Fix mip map size calculation for non-square textures HybridDog 2024-01-05 12:07:30 +01:00
  • 91e4129615
    Windows: Return early if the clipboard data is not Unicode text Muhammad Rifqi Priyo Susanto 2024-01-05 03:24:50 +07:00
  • 54b82aad26
    Add IrrlichtDevice::isWindowVisible for Android grorp 2024-01-04 16:48:35 +01:00
  • bff1a50c34 Minor code cleanup Mostly const fixes in headers to make it easier for users to have more warnings enabled in static code analysis Also updating our own rules a bit (kicking some out we won't need yet). cutealien 2024-01-01 15:29:28 +00:00
  • 2fdb1fc156 Fix changes.txt cutealien 2023-12-31 18:11:20 +00:00
  • 6b2a0fab78 Fix tessellation numbers in createCylinderMesh, createConeMesh, createArrowMesh Double tessellation numbers for these 3 functions in your code to get same results as in Irrlicht 1.8 cutealien 2023-12-31 18:04:15 +00:00
  • 245dd395cb Add default UV's for CGeometryCreator::createConeMesh Thanks @randomMesh for reporting that they were missing: https://irrlicht.sourceforge.io/forum/viewtopic.php?p=307308 Also simplified that code a bit (same could probably also be done for createCylinderMesh, but too lazy right now) Changed also UV's for top/bottom center vertex in CGeometryCreator::createCylinderMesh to use center for X (slight improvement, but would have to copy vertices to make it better) cutealien 2023-12-31 16:48:36 +00:00
  • 03dd8b0336 Update vendored khrplatform.h sfan5 2023-12-17 18:18:01 +01:00
  • 6e6b4a6f3c Fix some minor issues with GL loader sfan5 2023-12-17 18:10:39 +01:00
  • 0110826ce9 Resync mt_opengl_loader.cpp with BindingGenerator.lua sfan5 2023-12-17 18:00:19 +01:00
  • 4e52d547b2 MinGW toolchain refresh sfan5 2023-12-13 12:37:40 +01:00
  • 9a439a3646
    Use SDL2 by default Vitaliy 2023-12-17 20:46:08 +03:00
  • 854e97f57c Add size_t to u32/s32 static_casts in irrArray Josiah VanderZee 2023-12-16 12:14:55 -06:00
  • 22f2c37322 Add size_t to u32 static_casts to irrString Josiah VanderZee 2023-12-16 11:55:42 -06:00
  • 94cb0cc19d
    Use KHRONOS_APIENTRY to fix win32 crash paradust7 2023-12-17 08:00:41 -08:00
  • 8372a70f21 Fix uninitialized variable in CTriangleSelector and code cleanup CTriangleSelector constructor with IAnimatedMeshSceneNode parameter didn't initialize MeshBuffer. Not used internally, so no big problem, but it got passed back to users in some cases Replaced SCollisionTriangleRange, by CTriangleSelector::SBufferTriangleRange. Was a bad idea to use a struct which is for something else just because some member were the same (my fault, sorry). Also started unifying the case of using ranges vs not using them. Can maybe even get rid of the non-ranges case in future. Or unify the duplicated code for getting triangles at least. cutealien 2023-12-13 16:10:50 +00:00
  • 70b2e3a255 Can often copy instead of multiply matrix in CTriangleSelector If we already know we start with an identity matrix (which is usually the case) then copy will do. Also unifying code to create matrix of different CTriangleSelector::getTriangles functions cutealien 2023-12-13 15:05:08 +00:00
  • 66d189ce63 Bugfix: CTriangleSelector::getTriangles with bbox no longer ignores transform matrix So far it only used the inverse of the node transformation to calculate the box used to check Which gave wrong results as soon as one tried to pass an additional matrix transformation Wasn't ever used internally or by examples in Irrlicht, so I guess no one ever noticed (also in some cases this still worked accidentally). cutealien 2023-12-13 14:14:12 +00:00
  • 9b52d6fb0d Hash-check windows CI dependencies sfan5 2023-12-13 12:05:49 +01:00
  • 16a99c2079 Add a file to gitignore sfan5 2023-12-13 12:05:32 +01:00
  • bb7c06d32a Initialize X11 thread safety paradust7 2023-12-10 05:47:49 -08:00
  • 952f11f806 Fix: CGUITabControl now catching EMIE_LMOUSE_PRESSED_DOWN Same as most elements. Other behaviour a bit unexpected and unlikely to be useful. cutealien 2023-12-05 13:40:33 +00:00
  • a2884e4000
    Android: Make ALooper_pollAll call always non-blocking (#255) Muhammad Rifqi Priyo Susanto 2023-11-30 21:52:04 +07:00
  • b284ea076b Use newer vcpkg in Windows CI sfan5 2023-11-30 15:43:07 +01:00
  • 8985248142 Add comment about transparency sorting. Sometimes you only think about better implementations when the work is done *sigh* Can get back to it when we add custom sorting for solid nodes some day (another very old open feature request...) cutealien 2023-11-22 17:15:03 +00:00
  • c9e71e26f2 Switch default transparency sorting back from ETNS_PLANE_CENTER to ETNS_CENTER While there are some cases this fixes, like MartinVee's nice example for orthographic camera at https://irrlicht.sourceforge.io/forum/viewtopic.php?t=51598 it seemed to cause more problems in complex 3d scenes with perspective cameras. Well anyway - both options are available now for those which need it. cutealien 2023-11-22 16:59:24 +00:00
  • 3752bd9bd4 Add more transparent node sorting algorithms Adding 2 algorithms to sort by distance to camera plane instead of camera position. This is better in quite a few situations and extra cost is just one vector subtraction per node and an additional function parameter per call, I think that's worth it. So made the camera-plane to object-center now the new default. cutealien 2023-11-22 16:34:55 +00:00
  • 3c4ac201ce Add options for transparency node sorting algorithm Until last summer we sorted by object origin to camera distance Since then we used nearest transformed bbox-extent to camera. I've now added an enum to allow switching those plus 2 new: - none (so sorting based on scenegraph instead) - object center to camera. Which I made the new default as it worked the best in my tests. cutealien 2023-11-22 14:52:19 +00:00
  • ad4cd6ca7d Grammar Had missing word in comment cutealien 2023-11-13 15:04:40 +00:00
  • 8bf9cf5471 writeImageToFile param now used by CImageWriterPNG for compression level A bit annoying that it kinda has the opposite meaning for png and jpg compression for same parameter (png compression goes up, jpg goes down). Also unfortunate we chose u32 instead of int here or we could at least use the usual zlib value range for png. But I think it still won't mess up in many cases. Defaults (value 0) stay the same as before. And setting a jpg range <= 10 is rarely done and even if so it just changes png sizes a bit now if people use writer for both. People just have to be careful now when they override defaults for png and then also write jpg - but can't help it. And it's too useful to not have this - this can massively change the write-speed for png's (like up to 3 times faster with no compression on my system). cutealien 2023-11-13 14:53:44 +00:00
  • 3fa020d03c Change how SMaterial handles equality for UserData for more flexibility Different UserData values are no longer by default causing materials to be different. It now always checks in this case the IUserData != operator. This allows more user control. Can still have them be different by checking pointers in overloaded compare function. cutealien 2023-11-10 15:52:40 +00:00
  • feaed624f7 Remove serialization again from IUserData This can't work as on deserialize it would need to have the type for IUserData already. And that's impossible with the way it's used right now. Would need some kind of factory or so probably, but I'll ignore this for now. Note that it's still possible to call some serialization manually on the derived classes by adding it there if needed. cutealien 2023-11-07 17:43:01 +00:00
  • 3c9a856e6d Add SMaterial::IUserData to make it easier passing additional values to shaders Irrlicht generally avoided user pointers in the past, but after trying all kind of ugly workarounds - this is just easier and not that much downsides really. Tiny speed costs due to additional SMaterial memory size and new comparison tests. But allows to keep SMaterial alive and useful for a while longer without needing a complete rewrite and it can now be used for stuff like writing PBR shaders. Using a new interface io::IUserData for this which also allows serialization the user data (that part is untested so far, sorry) cutealien 2023-11-07 15:43:49 +00:00
  • d0605cf397 Update scene.irr test file to fix tests LensShift got added recently. Also there was some change in PolygonOffsetDirection longer ago (although that one didn't cause tests to fail) cutealien 2023-11-07 15:11:54 +00:00
  • 85081d6fe0 Fix off-by-one error in the TGA RLE decompressor numzero 2023-10-31 21:34:43 +03:00
  • eafc282efd Add unit tests for image loaders numzero 2023-09-30 21:26:08 +03:00
  • 8c2ad025b1 Add CTest numzero 2023-09-30 21:25:14 +03:00
  • a07cfc0f7a Require C++17 at the top level numzero 2023-09-30 21:29:31 +03:00
  • f725b68c57 Remove irrUString.h sfan5 2023-10-31 10:10:31 +01:00
  • 99be15f40b Bump revision 1.9.0mt13 sfan5 2023-10-27 17:45:52 +02:00
  • 6fccc79270 Convert built-in font to PNG sfan5 2023-10-25 16:54:22 +02:00
  • 7cade6f27f cleanup: remove _IRR_COMPILE_ANDROID_ASSET_READER_ build flag Loic Blot 2023-10-09 09:08:00 +02:00
  • ae63f1bf02 build: drop _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ Loic Blot 2023-10-09 09:02:46 +02:00
  • dd14486d3f cleanup: replace remaining #ifndef #define with #pragma once Loic Blot 2023-10-09 08:57:29 +02:00
  • 4a7d3de89a Merging r6555 through r6560 from branch releases/1.8 to trunk - Fixing buffer overflow in tga loader cutealien 2023-10-16 20:59:41 +00:00
  • d4f6d8c17b Add lens shift support for the camera and the perspective projection functions As Blender docs describe it so nicely: Using lens shift is equivalent to rendering an image with a larger FOV and cropping it off-center. This can be quite useful for architecture renderings, but I guess also has it's use in other situations. Note: Didn't make the ICameraSceneNode functions pure virtual so users don't have to update their cameras for this Also some change in serialization - same as in other places by now, do use existing values as defaults values when they are not found instead of resetting them to 0. cutealien 2023-10-19 16:04:43 +00:00
  • 567f8688e2 Mention in more places that ECFN_DISABLED disables zwrite as well Easy to miss... cutealien 2023-10-18 16:51:56 +00:00
  • 2b08c37f89 CSoftwareTexture::lock no longer returns image data when a mipmapLevel is requested Returns now getMipMapsData instead which for now will always be 0 in this case (but might work one day) Also removing comment about ITexture::lock() mipmapLevel parameter being broken. It got fixed in November 2019. cutealien 2023-10-17 17:55:39 +00:00
  • 849336343d Merging r6519 through r6561 from trunk to ogl-es branch svn-ogl-es cutealien 2023-10-16 21:17:56 +00:00
  • 614308e19c Merging r6555 through r6560 from branch releases/1.8 to trunk - Fixing buffer overflow in tga loader cutealien 2023-10-16 20:59:41 +00:00
  • e5c8a75d40 Document deviant ITexture::lock behaviour for EDT_SOFTWARE drivers Software driver sometimes works with original image (in 2D) and sometimes with POT version of the image (in 3D). That is probably useful so it can draw the UI in best quality while having relative fast 3D. The problem is that lock() only returns one data - so it decided to return the original data and then in unlock it updates the other data. But lock() data usually depends on getSize() so using EDT_SOFTWARE like other drivers causes crashes. Not sure what the best solution here would be (maybe more flags or more lock functions?), so I just document the deviating behaviour and leave it as is. cutealien 2023-10-15 21:38:06 +00: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. #252 cutealien 2023-09-26 21:31:35 +00:00
  • 9813b460e1 Fix number overflows in TGA loader causing crashes Image size calculation could overflow s32 in one place (but not others where it was done correct), which first lead to wrong amount of memory getting allocated for image data and later crash in the CColorConverter. Thanks @sfan5 for his fuzzing tests @https://github.com/minetest/irrlicht/issues/236 and @erlehmann for passing them on: https://irrlicht.sourceforge.io/forum/viewtopic.php?t=52925 Also updating changes.txt with TGA loader changes from this and previous commits. cutealien 2023-09-23 19:01:01 +00:00
  • 565f14677c Fix crash caused by memory overwriting in TGA loader caused by bad RLE data From sfan5's fuzzing test reported in Minetest here: https://github.com/minetest/irrlicht/issues/236 Was missing test if it writes beyond allocated memory which can be triggered by TGA's which lie in their RLE data. cutealien 2023-09-23 18:33:46 +00:00
  • f53af0f2cf TGA images with palettes in 24 or 32 bit now create 32 bit images Was creating 16-bit images for those before. Could also support 24-bit images, but either we need another convert function or another palette for that (the 16 and 32 bit both work with 32 bit palettes, the 24 bit conversion function only with 24 bit palettes) cutealien 2023-09-23 17:08:43 +00:00
  • 05ebc43222 Fix TGA's with bad palette colors reading from behind palette memory TGA's can claim to use less palette colors than they later do. We only support 8-bit palettes, so to make this safer lets just always allocate at least 256 bytes. Thanks @erlehmann for report and testcase: https://irrlicht.sourceforge.io/forum/viewtopic.php?p=307191 Based on Minetest bug report: https://github.com/minetest/irrlicht/issues/236 cutealien 2023-09-23 16:34:42 +00:00
  • c01de80583 Merging r6511 through r6520 from branch releases/1.8 to trunk Note: Due to OSX always failing merge OSX it's rather applying a second patch from Ryan Schmidt from bugreport #462 to trunk (Not sure why svn merging always fails for OSX. Probably related to MacOSX files getting moved in the past. Was that done without svn move commands? I guess that can't be fixed anymore now) cutealien 2023-08-04 10:22:58 +00: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) cutealien 2023-07-30 16:34:24 +00: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. cutealien 2023-06-12 19:26:43 +00:00
  • 627a3a5172 Spelling fixes cutealien 2023-04-27 18:44:33 +00:00
  • 01e05f3c94 Fix recently broken scroll behaviour of listbox with moveOverSelect This also fixes the combobox which users the listbox like that. This got broken in [r6454] which had fixed the events send out by the listbox Note: Still a bit strange behaviour when leaving the combobox at the bottom, but that was already that way in Irrlicht 1.8, so I've got to investigate that on it's own. cutealien 2023-04-19 15:17:39 +00:00
  • b673a4b2bb Tiny spelling fixes cutealien 2023-04-16 21:52:36 +00:00
  • 5e01152f56 Avoid warning in VS 2022 cutealien 2023-04-11 13:19:12 +00: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. cutealien 2023-04-03 15:32:41 +00:00
  • 774d3d6d2b Spelling fixes cutealien 2023-04-01 15:50:08 +00:00
  • e1f41edd29 Spelling fixes cutealien 2023-03-31 13:12:47 +00:00
  • c766c3a023 Fix character encoding conversion issues Gregor Parzefall 2023-10-05 17:55:55 +02:00
  • 93eebed8c9 Unify documentation between IOSOperator and COSOperator Gregor Parzefall 2023-10-05 17:52:58 +02:00
  • 645b51a34d OpenGL3: Use std::vector in VertexType instead of clever lifetime games numzero 2023-10-11 19:40:49 +03:00
  • bcc53e1e1a OpenGL3: Make sure mt_opengl is only included after GLAPI is defined numzero 2023-10-07 20:26:48 +03:00
  • d4735ebc76 OpenGL3: Replace direct calls into libGL with mt_opengl numzero 2023-10-07 19:47:16 +03:00
  • 063079b372 OpenGL3: Make VertexType reference and not store the attribute list numzero 2023-10-07 20:30:18 +03:00
  • 3b198bdfda OpenGL3: Fix noexcept mismatch numzero 2023-10-07 19:57:40 +03:00
  • f06347c8b7 Load top-down bmp images correctly Previously we handled all sizes as unsigned, but Windows BMP files can have negative height to signal top-down images. No clue about left-right (would be trivial to swap as well, but found no info so far if that would be correct) cutealien 2023-10-05 21:04:55 +00:00
  • 5b2f1927d0
    Revert #225 (d98dc90b3808335a54b3ab7fe10f177148423942) Gregor Parzefall 2023-10-04 23:29:59 +02:00
  • 9954667c45
    Cleanup line endings (#245) Vitaliy 2023-10-03 21:37:00 +03:00
  • 099f83c023 Fix compiler warning in COBJMeshFileLoader Caused by recent patches for 1.8 - which still had different parameter types in IReadFile::read cutealien 2023-10-03 15:55:45 +00:00
  • 857c75f37d Merging r6555 from branch releases/1.8 to trunk - Fixing buffer ovverread in CXMeshFileLoader (sfan5 patch) cutealien 2023-10-03 15:21:39 +00:00
  • b6e9202272 Merging r6551 through r6553 from branch releases/1.8 to trunk All about bounds checks and preventing buffer overruns in b3d and obj files based on sfan5 patches for Minetest cutealien 2023-10-03 15:08:40 +00:00
  • b93dac3ee1 Merging r6547 from branch releases/1.8 to trunk Just updating changes.txt (stuff got backported, so changes are now mentioned in 1.8.6 instead of 1.9) cutealien 2023-10-03 12:56:33 +00:00
  • 7fd0f2b1fb COBJMeshFileLoader: Avoid memory leak when handling files with invalid vertex indices Thanks @sfan5 for report and patch Was part of the Minetest commit 80e1609 patch which was applied earlier (couldn't apply this with the rest as the rest could be fixed in Irrlicht 1.8, while this one is about new Irrlicht 1.9 code) cutealien 2023-10-02 21:49:08 +00:00
  • 5a6e8c9d65 Merging r6522 through r6546 from branch releases/1.8 to trunk - Fixing buffer overflows in bmp and obj loaders - Fixed loading of rle4 encoded bmp images cutealien 2023-10-02 21:42:40 +00:00
  • ea1b58387e
    ComboBox API additions for minetest#13814 Gregor Parzefall 2023-09-30 16:46:30 +02:00
  • d767d27ca8 CXMeshFileLoader: revise error checking sfan5 2023-09-18 21:40:13 +02:00
  • 6f4f7c4d75 CXMeshFileLoader: fix buffer overreads with text format sfan5 2023-09-18 21:39:56 +02:00
  • 103ab16679 CB3DMeshFileLoader: fix string read primitive sfan5 2023-09-18 22:32:05 +02:00
  • 64688f4490 CB3DMeshFileLoader: add some bounds checks sfan5 2023-09-18 19:41:58 +02:00
  • 827710f74a COBJMeshFileLoader: properly check indices sfan5 2023-09-18 22:08:55 +02:00
  • 80e160935d COBJMeshFileLoader: fix buffer overruns sfan5 2023-09-18 19:27:28 +02:00
  • 4506d23dc3 CImageLoaderBMP: add bound checks to RLE decompression sfan5 2023-09-18 15:17:46 +02:00
  • 028cb8dbed CImageLoaderBMP: check bitmap data against required size sfan5 2023-09-18 15:17:14 +02:00
  • a5c9945bb8 CImageLoaderBMP: fix palette overreads sfan5 2023-09-18 15:16:26 +02:00
  • cd70803500 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. cutealien 2023-09-26 21:31:35 +00:00
  • cfb73d07d7 Remove more obsolete files numzero 2023-09-23 11:09:39 +03:00
  • 87f7cf3438 Drop unused resource script numzero 2023-09-23 11:00:33 +03:00
  • ebe4fd0a59 Refer to the origins in README numzero 2023-09-23 09:57:58 +03:00
  • fc7e3f2dff Move license to the root numzero 2023-09-20 22:45:08 +03:00