Commit Graph

348 Commits

Author SHA1 Message Date
cutealien
f61b8614ab Cleanup example 22.MaterialViewer
Using default light values which work a bit better with cube.
But really needs another cube-type (which Irrlicht has not yet, needs single material with 24 vertices)
as a cube with vertex normals which average connected sides is horrible with vertex-lighting
(the problem is that the light get's behind the plane formed by the vertex-normal this way which is super confusing).
Will probably add another cube-type soon.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6312 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-20 19:09:40 +00:00
cutealien
73247f4a21 Make UI in example 22.MaterialViewer a bit nicer.
Less black on grey text.
Prevent controlling light and ui-elements same time.
Bit more compact code in a few places.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6311 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-19 16:07:38 +00:00
cutealien
8254c0848c Minor cleanup and comment fixes in example 21
Mostly spelling stuff. 
Only real code change is that Irrlicht has by now a function to fill images, so no more extra code for that needed.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6310 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-17 20:12:40 +00:00
cutealien
3035e27e67 Remove unused variable in example 19
Added that one accidentally in my last commit (leftover from a failed experiment)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6309 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-17 19:16:28 +00:00
cutealien
713018cae1 Minor update for example 19.MouseAndJoystick.
Don't move the mouse anymore when the mouse hasn't moved.
This was sometimes confusing because events are only caught inside the window (at least on Windows),
which lead to the node moving seemingly randomly when the mouse was outside.
Also added a few more comments to mention CursorControl as an alternative.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6308 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-16 20:59:43 +00:00
cutealien
e50adc3066 Add tiny UI to SplitScreen example and some minor cleanup.
Just to show that GUI can be used print usable keys on screen.
Also ESC can be used now to quit.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6307 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-15 19:31:04 +00:00
cutealien
d31b7aa261 Minor comment changes in example 16
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6306 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-14 17:59:47 +00:00
cutealien
530ddbf32f line2d::intersectWith now using f64 instead of f32 internally
Avoid losing precision when working with line2d<f64>

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6305 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-14 15:11:05 +00:00
cutealien
709cbe9df6 Avoid some more warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6304 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-10 12:51:10 +00:00
cutealien
c5fd5bc4cd Avoid warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6303 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-10 12:24:03 +00:00
cutealien
c20d3d08b6 Cleanup code & documentation of Example 14 a bit.
Note: Turns out we never got rendering into 2 OpenGL Windows same time working.
Not going to look into this for now as it's not a new bug (never seems to have worked).
If anyone has more information (like maybe it's not possible?) be nice and tell us in the forum.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6302 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-09 18:26:23 +00:00
cutealien
3ad07543be Add IGUIImage::flip to allow flipping/mirroring images.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6301 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-03-08 18:44:23 +00:00
cutealien
3da5987f4b IVideoDriver::setMaterialRendererName now using u32 for index like other similar functions
Other functions like getMaterialRendererName got switched to u32 in the past. I can see no reason why this one was left out, so changing it to be same as the rest.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6300 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:28:45 +00:00
cutealien
19b003a840 IBillboardSceneNode got functions to access meshbuffers.
So uv-coordinates can now be modified directly (previously only possible via texture matrix).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6299 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-08 21:00:12 +00:00
cutealien
57f518737d vector3d scalar operator/ and operator/= no longer multiply by the inverse but use the expected division.
That was a bad case of premature optimization.
Multiplication is indeed faster, but when working with floats this can introduce some rather unexpected inaccuracies.
Like x/x suddenly no longer being 1.0 (something guaranteed by division). 
If someone really needs this back, then please add some new function which makes it clear we don't just have a typical division here.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6298 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-03 14:47:41 +00:00
cutealien
42c0b17435 Relax test a bit. Minor example cleanup.
Invisible difference, probably some mip-mapping pixel.
Getting rid of some unnecessary global in example 14


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6297 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-22 16:42:12 +00:00
cutealien
0fb6891267 Avoid some warnings from static code analysis.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6296 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-22 15:54:43 +00:00
cutealien
62cf8296b1 Bugfix: XML reader no longer drops last character in strings after certain character replacments
Due an off-by-one error it went wrong where there a special character replacement for the second-last character going on.
So something like "&lt;X" became "<" instead of "<X".

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6295 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-11 14:45:08 +00:00
cutealien
31f5da289f Remove CPPFLAG -I/usr/X11R6/include in all example Makefiles
None uses X11 directly, this is only needed in the Library itself.
Also this was even added on all platforms while many don't even have X11.
Thanks @Isomorphix noticing something off about that once (a long time ago...): https://irrlicht.sourceforge.io/forum/viewtopic.php?f=1&t=49033


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6294 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-09 15:50:41 +00:00
cutealien
1dbab53e5a Prefer static_cast to reinterpret_cast where possible.
Just safer. Could probably do in a lot more places... another time.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6293 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 18:22:20 +00:00
cutealien
cfb27d9a74 Add some error checking in COSOperator::copyToClipboard
GlobalAlloc and GlobalLock can return NULL

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6292 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 17:36:20 +00:00
cutealien
9e27a6d4bf Avoid allocating more than 16k on stack in OCT loader.
Also avoid potential heap overwrites in there.
Sadly I have no examples for OCT files and it doesn't seem like a very common format as I couldn't even find any examples online.
So just assuming my changes work.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6291 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 17:30:06 +00:00
cutealien
98aed6ba67 utf8ToWchar and wcharToUtf8 work with sizeof checks instead of defines now to call correct conversion
Tiny speed hit, but old solution caused warnings. 
And it was not very safe by assuming all non _WIN32 platforms would use 32 bit sizes for wchar_t.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6290 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-08 15:19:46 +00:00
cutealien
c2ff824550 Define out unused functions in dmf loader to avoid warnings.
I don't know enough about DeleD from Delgine to fix this. 
But keeping the functions defined out as long as they don't get in the way.
Also I'm a bit suspicious about the license... for use in Irrlicht core only under zlib license?
That's not really zlib license then :-(


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6289 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 17:24:38 +00:00
cutealien
ed693fddca Avoid some warnings.
gcc does not like mixing enums and numbers


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6288 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 16:47:56 +00:00
cutealien
3e7a4666d5 Merging r6283 through r6284 from branch releases/1.8 to trunk
- Updating to zlib 1.2.11


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6285 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 16:23:03 +00:00
cutealien
30b78dab9b Merging r6274 through r6281 from branch releases/1.8 to trunk.
- Updates bzip2 to 1.0.8 (which sadly didn't reduce the amount of compile warnings, but let's hope it still improves something)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6282 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-07 15:45:58 +00:00
cutealien
b11c4c142c Remove several copy-constructors and assignment operators which did nothing special.
They all just implemented the same the default functions do.
This causes now warnings with newer gcc -Wdeprecated settings (otherwise they would have had to implement always both, but makes no sense as they did nothing special).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6280 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-06 14:02:12 +00:00
cutealien
1e7ceac26c Remove assignment operator in quaternion.
It's identical to the implicit one generated, so we don't need that.
And it triggers warnings with -Wdeprecated in newer gcc.
It's because the implicit definition of a copy constructor is deprecated if the class has a user-declared copy assignment operator.

There's a few more warnings about that in Irrlicht, will have to check them in detail as the other cases are not as trivial to fix as this one.



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6279 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-06 12:01:36 +00:00
cutealien
66f9511745 Fix: 64 bit integer typedefs have different definitions in different compilation units Mac OS
Thanks @edo9300 for reporting: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=52795
This is also once more trying to fix bug #433


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6278 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-04 18:44:35 +00:00
cutealien
dadbf64a8c Merging r6274 through r6276 from branch releases/1.8 to trunk
- Security fix for md2 loader


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6277 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-01-02 20:15:24 +00:00
cutealien
e7c7e36347 obj file loader now allows using mtl files with spaces in the filename.
mtllib commands previously used only the first word, now they use the rest of the line.
Different obj format descriptions describe the mtllib command in 2 different ways:
- http://paulbourke.net says it can load several mtl files separated by spaces
- Wikipedia says it can load one mtl file (but there can be several mtllib commands)
We previously loaded 1 file - using the name up to the first space character, so it basically was not correct for either solution. We now go with Wikipedia, because it allows using space in filenames and I tested several other tools and they all handled it like this.

Also COBJMeshFileLoader::copyLine no longer copies the newline character (didn't do that always anyway and we don't need it)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6275 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-22 16:19:59 +00:00
cutealien
e037502141 Merging r6272 from branch releases/1.8 to trunk
- readme.txt fix


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6273 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-12 14:04:12 +00:00
cutealien
2bed22acbb Merging r6270 from branch releases/1.8 to trunk
- Prevent buffer overflow in md2 loader


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6271 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-12 13:55:03 +00:00
cutealien
73d562d745 Merging r6266 through r6268 from branch releases/1.8 to trunk
- Spelling fixes
- Makefile adding to CFLAGS instead of replacing them.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6269 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-12-05 20:25:26 +00:00
cutealien
3e61e81b06 Merging r6203 through r6264 from branch releases/1.8 to trunk
Just updating text files after Irrlicht 1.8.5 release.
All other changes had been backports and were in trunk already.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6265 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-11-01 15:47:21 +00:00
cutealien
60b245bf4f de-deprecate clearZBuffer
Lets just keep this one around. Easy to use, downward compatible and generally works as expected.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6259 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-10-13 10:12:04 +00:00
cutealien
377e9c59df Change _IRR_OVERRIDE to IRR_OVERRIDE also on OSX headers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6256 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 19:19:09 +00:00
cutealien
b691098fae Unify VS project files some more.
Trying to clarify comments in irrLegacyDefines.h

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6254 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 18:09:14 +00:00
cutealien
3d2a55e788 Replace header guards in source folder to avoid using identifiers reserved by c++
Basically fixing original Bug#427 reported by MArkus Elfring.
Unfortunately there are still more defines (in IrrCompileConfig.h) which also are not nice c++
Lots of files touched for very minor cleanup *sigh*

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6253 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 15:55:04 +00:00
cutealien
0c6385cb92 Replace public header guards to avoid using indentifiers reserved by c++
Usually something like __IRR_SOME_GUARD_INCLUDED__ replaced by IRR_SOME_GUARD_INCLUDED.
Removing underscores at the end wasn't necessary, but more symmetric (probably the reason they got added there as well).
While this touches every header it shouldn't affect users (I hope).

Also a few whitespace changes to unify whitespace usage a bit.
And a bunch of spelling fixes in comments.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6252 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 15:03:34 +00:00
cutealien
ffd7b63af0 API BREAKER: Replacing defines in irrTypes.h which are conflicting with c++ reserved identifier rules.
C++ has undefined behavior for identifiers starting with __ or with _ followed by an uppercase letter.
We still have many more (in IrrCompileConfig.h and in all header-guards), will likely replace those later as well.
As a workaround for users which might use irrlicht defines in their code, I've added the header irrLegacyDefines.h
Including that allows to continue using old defines for a while - or make it easier to have code which compiles 
with old and new Irrlicht library versions.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6251 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 12:55:10 +00:00
cutealien
ee180dbd24 Unify VS project files and add a few more headers into them.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6250 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-27 10:47:05 +00:00
cutealien
dba40bb36f PACK_STRUCT was likely ignored in ieee654 struct.
clang warned about that and I think warning made sense. Also still works on gcc - will test on VS tomorrow.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6248 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:32:17 +00:00
cutealien
9564827d57 Avoid clang warning.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6247 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:30:44 +00:00
cutealien
8e149ffb40 Avoid gcc warning and fix some indention/whitespace.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6246 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:09:08 +00:00
cutealien
0c2049610a Add missing _IRR_OVERRIDE_
Clang complained.
Slightly interesting case - pure virtual function with override - I suppose for documentation purposes.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6245 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 21:00:31 +00:00
cutealien
7812d914f2 Add comments in IRenderTarget interface.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6244 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 16:49:47 +00:00
cutealien
d03881b83a Reworking IRenderTarget interface to avoid constant memory allocations.
setTexture functions for single textures (more or less the usual case) IRenderTarget no longer need memory allocations 
on each call.
Also calling IRenderTarget::setTexture with a nullpointer no longer sets a rendertarget with an array which contains a single nullpointer but clears the array instead.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6243 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 16:45:20 +00:00
cutealien
075c64bebb Add equals and set_data functions to core::array for easier working with blocks of data.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6242 dfc29bdd-3216-0410-991c-e03cc46cb475
2021-08-26 16:41:14 +00:00