Commit Graph

1227 Commits (master)

Author SHA1 Message Date
cutealien b737b425ba Checking TextureMatrix pointer before de-allocating.
While possibly double-checking the pointer now (which would be slightly slower when it's non-0), it's generally increasing speed of SMaterialLayer as our allocator is still somewhat expensive when the pointer is 0 (which is generally the case). And the cost would increase further when we raise max texture numbers soon.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5676 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-16 20:53:37 +00:00
cutealien 91247910b8 No longer overwrite memory when compiling with _IRR_MATERIAL_MAX_TEXTURES_ set to a value > 8
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5675 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-16 18:22:04 +00:00
cutealien f16f173fcb setMaterial no longer changes texture-matrices in GL and D3D9 when no texture-pointer is set.
This increases speed slightly (mainly in debug and more so when we increase max-texture-limit soon).
Texture-matrices are only used together with textures in the fixed function pipeline and for shaders the users
have to to pass them anyway on their own.
So the main difference now is that after setMaterial calls with empty texture pointers we no longer get 
a changed texture matrix which can be checked with IVideoDriver::getTransform.
I suppose the main reason where we might want to still access that matrix without a textures is when it's abused to pass values for other stuff in shaders (which is still possible). 

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5674 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-11 18:26:04 +00:00
cutealien b3e9af5722 Add IMaterialRenderer::getShaderConstantSetCallBack to allow access to user provided shader callbacks.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5668 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-12-01 15:55:32 +00:00
cutealien 8f2eb13099 Allow to create images with floating point formats.
While IGUIImage doesn't support those well yet, it at least allocates memory and that turns out to be useful sometimes. For example we can now lock() floating point textures and access the data on OpenGL, which wasn't possible before. If this turns out to cause any problems (shouldn't really) we can handle them case-by-case.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5666 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-11-29 16:04:39 +00:00
cutealien b584c39295 ITexture::lock interface changed.
- mipmapLevel is now the second parameter as it was in Irrlicht 1.8 (but currently not doing anything)
- layer moved to third parameter
- New parameter lockFlags which allows to disabled flipping the texture upside down for RTT's on OpenGL.
Sorry for any inconvenience this change causes, but as I had to break the interface now anyway I decided to make it backward compatible to Irrlicht 1.8. Anyone already using the new "layers" feature in trunk will have to move the layer parameter now. But the last interface change which replaced the mipmaplevel with another variable with very different meaning wasn't a solution.
Mipmap support can also likely be re-introduced. At least I still haven't seen a real reason why it shouldn't be possible to have that anymore.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5663 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-11-22 19:13:59 +00:00
cutealien 343924adb7 Add IVideoDriver::addTextureCubemap function to create an empty cubemaps.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5662 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-11-22 14:40:34 +00:00
cutealien 05a05b75d1 Enable seamless filtering for cubemaps on OpenGL by default and add a new driver feature flag to disable it.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5661 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-11-20 15:47:13 +00:00
cutealien fb7e234561 Add a default parameter to some IAttributes::getAttributeAsEnumeration functions.
Use existing values as default values now in serialization of CGUIEditBox.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5656 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-11-10 13:55:12 +00:00
cutealien 8518f3bd2c Revert r5645 (adding default value).
Reason: No c++11 code in Irrlicht 1.9 and also - this value already is default in core::string, so no need to set it.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5648 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-10-04 10:03:11 +00:00
dbocksteger c8ec2d3e05 Added Default-value for ISceneNode->Name so the code won't crash if someone tries to compare it with empty...
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5645 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-10-04 05:57:43 +00:00
cutealien 4edf23c775 Add serialization for ToolTip to IGUIElement. Thanks @chronologicaldot for fix.
Forum: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=52374


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5642 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-09-12 09:47:38 +00:00
cutealien b44b6891a6 Add typedefs like value_type and size_type to array, list and map like std containers have.
Thanks @SLC for idea (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52363)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5639 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-08-23 09:52:13 +00:00
cutealien 438fb2a0ac Remove unused enum E_LOST_RESOURCE
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5630 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-07-19 20:25:34 +00:00
cutealien b795ba324b Add support for cubemap rendertarget textures on D3D9.
(OpenGL still needs to be done).
Example will follow.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5627 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-07-12 19:19:11 +00:00
cutealien 7942f3dae6 Set ETCF_ALLOW_MEMORY_COPY to "on" by default.
This means opengl textures keep again a copy in main-memory as they did in Irrlicht 1.8.
The reason this is changed back is because otherwise ITexture::lock() for alpha-textures is broken by default.
This is a (long time reported) bug, but it has gone unfixed for over a year and caused too many problems.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5624 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-07-01 12:21:17 +00:00
cutealien 2246895ae1 CGUIComboBox uses now EGDS_SCROLLBAR_SIZE instead of EGDS_WINDOW_BUTTON_WIDTH for the width of the listbox button to allow changing that without changing window topbar height.
It also changes now directly when the value is changed in the skin.
Thanks @LunaRebirth for reporting. 
Forum-link: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52297&p=303682#p303682


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5620 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-06-17 19:31:14 +00:00
cutealien 9d315a9354 CGUIListbox, CGUITreeView and CGUITable now resize scrollbars when EGDS_SCROLLBAR_SIZE in the skin changes without having to re-create the elements.
This also fixes the problem that drawing looked wrong when this value got changed after the elements were created.
Thanks @LunaRebirth for reporting. (Forum: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52297&p=303682#p303682)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5619 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-06-16 22:27:08 +00:00
cutealien e3282308c1 Spelling fix.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5616 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-06-01 10:20:15 +00:00
cutealien a7a90ff191 Add IVideoDriver::swapMaterialRenderers to allow swapping the renderer used to render a certain material.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5613 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-05-17 15:04:43 +00:00
cutealien 63ec10d099 Adding documentation about the way tangents/binormals are passed to shader.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5612 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-05-16 21:23:05 +00:00
cutealien a8b9071f96 Add ITerrainSceneNode::setFixedBorderLOD to handle connecting terrain nodes without gaps. Thanks @diho for the bugreport, testcase and a patch proposal.
Forum: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=9&t=51220


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5610 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-05-14 21:03:11 +00:00
cutealien fb39389bb8 STL writer does now also write binary files when EMWF_WRITE_BINARY flag is used. Based on patch from JLouisB. (Forum: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=9&t=52261)
(EMWF_WRITE_COMPRESSED also still works for downward compatibility)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5608 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-05-12 15:24:33 +00:00
cutealien c422dcbe4d Document IVideoDriver::makeNormalMapTexture some more.
Mainly to make it obvious that (at least for now) only the red-channel is used for 32-bit textures.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5606 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-05-09 20:50:45 +00:00
cutealien 30c123214e Improve documentation about ECF_A8R8G8B8.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5601 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-02-06 20:12:30 +00:00
cutealien c4247febe5 IImage::copyToWithAlpha has a new parameter to allow combining alpha value instead of replacing them.
This uses new blitters called BLITTER_TEXTURE_COMBINE_ALPHA. 
Thx @chronologicaldot for providing this patch and @burningreggae for his feedback.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5590 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-12-06 20:54:57 +00:00
cutealien 6a05db3a0a Prevent some compiler warnings when using clang.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5585 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-28 21:54:18 +00:00
cutealien fc1b290951 Fix a few places which called the driverType a deviceType (variable-names and documentation).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5584 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-22 17:09:56 +00:00
cutealien 42958c233a Move E_TEXTURE_TYPE enum from IImage.h to ITexture.h
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5583 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-22 17:02:55 +00:00
cutealien e6cf90d594 The new EGET_ELEMENT_REMOVED event got... removed.
Sorry, it had sounded like a good idea when I coded it, but the original reason for asdding it (allowing the gui-enviornment to notice when elements are removed) never worked out anyway. And now I learned about other problems this can cause. Just too risky to use the event-system for this, have to find another solution some day.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5581 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-17 15:16:43 +00:00
cutealien 00d79992a0 Add entry for ECF_UNKNOWN to ColorFormatNames.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5575 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-09 21:11:09 +00:00
cutealien 78572df3f1 Use index notation instead of row/column notation in CMatrix4::getInverse as in other matrix functions.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5570 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-06 16:59:10 +00:00
cutealien 9c0cd04730 Add _IRR_COMPILE_WITH_PARTICLES_ to control compilation of particle system
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5566 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-06 14:18:17 +00:00
cutealien a03af926e9 Add IGUIImage::setDrawBackground to allow disabling background drawing even when no texture is set.
I considered also adding more flags to allow background drawing when a texture is set, but couldn't 
really find a good use-case for that, so keeping it simple (also that case could be done 
otherwise with a second element and disabling background drawing for top-element completely).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5563 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-03 22:34:46 +00:00
cutealien 99f957efe9 Update documentation.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5562 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-03 21:42:16 +00:00
cutealien e2ca877234 Add gui event EGET_ELEMENT_REMOVED. Remove active focus now from elements which got removed from the gui graph.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5559 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-01 20:57:10 +00:00
cutealien 92799fded9 Add IGUIButton::setOverrideColor to allow overriding text-color (same function as statictexts and editboxes have).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5546 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-21 14:56:19 +00:00
cutealien 4d59133e49 Add functions IGUIButton::getClickShiftState and IGUIButton::getClickControlState to get shift/ctrl key-state when a button was clicked. Thanks @StarSonata for patch (long time ago...).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5545 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-19 21:00:50 +00:00
cutealien 06efc9a196 Add function ISceneManager::clearAllRegisteredNodesForRendering.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5544 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-10-02 15:00:19 +00:00
cutealien c6129f81e9 Revert ftell checks from r5532. Add documentation.
I suppose not checking gives a chance for ftell to go wrong in which case we can get an error (size -1). 
Arguably which solution is better - I reverted it simply because not changing old behavior is probably better than changing it.
Also added documentation about getSize to IReadFile, IWriteFile and IFileReadCallBack that those functions can return -1L on error
(thanks @dixx for mentioning that in http://irrlicht.sourceforge.net/forum/viewtopic.php?f=4&t=52086).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5538 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-27 15:09:34 +00:00
cutealien c2be178b5d Add string array with color format names.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5533 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-24 20:54:08 +00:00
cutealien 4ee827b16a Move SOverrideMaterial to it's own header.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5528 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-23 16:41:15 +00:00
cutealien 2c50d344fe Add function IVideoDriver::queryTextureFormat to allow checking if a driver supports textures with a specific color format.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5523 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-21 13:53:01 +00:00
cutealien 65d70ad066 Add matrix4 constructor taking all 16 values.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5518 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-16 12:05:15 +00:00
cutealien 9d2b8796b0 Add log warnings when users try to call addTexture with an empty name.
Add documentation that using an empty name with addTexture is not allowed.
Note: The reason for keeping this behavior is that we would otherwise return a pointer which 
would have to be dropped - which is only allowed for functions starting with the word create.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5517 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-08-15 22:02:37 +00:00
cutealien d476cbe3e9 Fix driverChoiceConsole when allDrivers is set to false.
Simply didn't work before. Is now the default - so examples should only show
available drivers.
Also update documentation in example 02 slightly.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5496 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-07-04 15:56:09 +00:00
cutealien 5a74edd043 Prevent copying IRenderTarget objects
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5490 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-30 14:33:29 +00:00
cutealien 56b2701f04 Next try at fixing bug #433 (https://sourceforge.net/p/irrlicht/bugs/433/)
The fix in r5480 couldn't work because the previous c99 check did fail with c++ compilers.
Now including limits.h as that seems to use __WORDSIZE internally. And also we include it already at other places
so it shouldn't add new problems (unlike stdint.h and/or <stdint> which is one of the biggest messes c/c++ ever produced
if you try to use it in compiler/platform independent code which compiles under c and c++).
But... still not sure if the bug is fixed like that now.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5489 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-20 22:44:04 +00:00
cutealien 51961da07d ISceneManager::getMesh can now creates meshes with alternative cache-names.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5483 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-11 10:04:00 +00:00
cutealien ba24819b82 Trying to fix problem with function signatures changes depending on include order of irrlicht.h and stdint.h
This was reported in bug #433 by neoascetic (https://sourceforge.net/p/irrlicht/bugs/433/)
Still have to test compiling this on more platforms. If it works we might backport it to 1.8


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5480 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-10 11:46:38 +00:00
cutealien 5c930a0f45 Document troubles with draw2DLine on OpenGL/Direct3D.
No workaround yet (except drawing line twice once start to end, then end to start, that would work... not yet sure if that's a good solution).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5476 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-07 19:37:22 +00:00
cutealien 99d93a8b16 Comment change.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5472 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-04 21:48:03 +00:00
cutealien 48f0b799b0 Lets the BSP loader find textures inserted with relative paths. Thx@ curaga for patch (#208).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5471 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-04 21:36:13 +00:00
cutealien 5bfba69e9d Simplify ALLOC_STRATEGY_DOUBLE in arrays somewhat.
Increasing the constant to add elements always instead of having an extra-check for small numbers.
Behavior is similar to old one (adding 4 elements more for most numbers).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5468 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-02 15:11:55 +00:00
cutealien 49b59e39b1 Documentation changes (mainly to document allocation strategies)
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5465 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-06-01 22:43:47 +00:00
cutealien 24336634a8 Add some documentation to clarify what ISceneManager::getSceneNodesFromType does do.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5461 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-05-18 13:04:57 +00:00
cutealien b1481d830e equals is back to returning a bool.
I guess returning the template paramaeter was some accident.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5458 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-05-05 13:36:05 +00:00
cutealien 966712c571 Add alternavive BoundingBox calculation for BillboardSceneNode which can take in a camera node. Thx @Seven and @JacKDuRdEn for bugreports.
There are still some problems (and even bugs) with all this, but fixing those will take more time. I documented some of the problems in code.
Also switched to using a MeshBuffer in the billboard (mainly because it's nicer for the emscripten port).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5452 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-22 17:29:16 +00:00
cutealien fabd6cda44 - FPS camera now supports keyboard rotation.
- Base FPS-camera movement on last position of mouse instead of always center (works better on platforms where cursor-placement is not allowed).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5448 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-21 14:29:07 +00:00
cutealien 6355bc18b7 Add IOctreeSceneNode interface to control parameters like VBO usage and polygon clipping checks for octree scene nodes.
This was already possible, but needed users to set some defines and recompile Irrlicht.
As before it's only implemented for the EVT_2TCOORDS vertex format (others will follow soon).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5434 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-19 16:28:24 +00:00
cutealien 5b6a6adf1f Undo the deprecate for old beginScene and setRenderTarget functions.
There's too much code out there using it and it doesn't really cost us anything to just keep those functions around 
as they are implemented as thin wrappers around the new implementations. 


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5431 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-18 12:21:24 +00:00
cutealien dbd17774d0 Fix patch for meshbuffers with different primitives.
Half the calculations for number of primitives had been wrong.
Also fix a compile-warning.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5427 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-16 21:34:58 +00:00
cutealien de1bbfdc50 - Add support for different geometric primitivs to meshbuffers.
Thanks @gerdb for patch proposal (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=45999)
Note: Original patch got mostly lost (except the parts posted in the forum). So not sure how close my implementation is to that one. I also simply ignore some of the problems mentioned in that thread. So yeah - meshmanipulator and meshwriters can and will mess up when other primitive types are set for now. It's documented and feature is still useful - other parts can be adapted over time (or ignored, also no big problem).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5425 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-14 19:48:24 +00:00
cutealien c7e0b42554 Optimizing line2d::intersectWith and line2d::fastLinesIntersection.
(was mainly to get rid of warnings in line2d::fastLinesIntersection with llvm about unused variables)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5420 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-13 12:34:56 +00:00
cutealien 278dc39029 UserEvent now usize size_t for UserData fields to avoid cutting number on some platforms.
Fix some warnings.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5417 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-12 16:22:35 +00:00
fixeworks e6936a81fe Removed duplicated method I added by mistake in vector2d.h Refactored code to use older and better method.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5399 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-03 11:59:06 +00:00
fixeworks cd3c0beb9d Fixed all compilation errors that Visual studio skipped. Now all added functions are unit-tested.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5397 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-02 19:01:33 +00:00
cutealien 34639b9d70 Fix some compile errors and warnings on MinGW.
Note - still not compiling - will take a moment - have to fix other one in Irrlicht 1.8 first.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5391 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-02 14:40:33 +00:00
fixeworks 56f0372862 Added new intersection methods, improved comparison to be reusable (without hardcoding rounding constants), added unit tests for some functionality
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5390 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-02 12:41:13 +00:00
cutealien 49cc0f54ad Merge branch releases/1.8 revisions r5369:r5387 into trunk.
- Fix bug in cursor positions when compiled with newer Windows SDK's (v110 in VS2012) and running on Systems >= Windows Vista in windowed mode.
- IOSOperator::getSysteMemory() no longer returns incorrect values with >2GB.
- Spelling fixes and documenation


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5388 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-01 16:26:31 +00:00
cutealien bd9ff4940b Revert r5384 partly. Didn't compile.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5386 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-30 22:04:22 +00:00
cutealien ee1baae711 Revert r5383 (compile errors).
Can be added again as soon as fixed.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5385 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-30 10:31:10 +00:00
fixeworks d783e760ee Added more intersection tests for Line2D. Fixed typos for Reference operator "&".
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5384 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-29 13:47:19 +00:00
fixeworks f46acc45b8 Added methods to test orientation and if a point is on a segment
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5383 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-29 11:53:50 +00:00
fixeworks 29d9eab99c Fixed semicolon typo. Sorry
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5381 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-29 09:39:14 +00:00
fixeworks 03aba69d19 Added methods to check if 2 lines are incident segments (intersects in exactly 1 point) or intersect in general (also colinear)
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5380 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-28 08:10:11 +00:00
fixeworks b3509fe8e9 Fixed a compiler warning in matrix4
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5379 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-28 08:05:14 +00:00
fixeworks 4649f03f13 Added normalization to quaternion.h where needed. Added a faster method that relies on quaternion being already normalized. Removed a useless conditional branch.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5378 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-28 08:02:41 +00:00
cutealien 2882711b7f Add ITextSceneNode::setFont.
IBillboardTextSceneNode has now it's own type (was using same type as ITextSceneNode before). See Bug #197.
But serialization of both text-nodes still not working (needs font-serialization).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5373 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-20 17:00:36 +00:00
cutealien 83be80032b Add access functions to IBillboardTextSceneNode (getText, getFont).
Fix IBillboardTextSceneNode::setTextColor which did only set an unused variable. It now maps to setColor instead.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5372 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-20 16:35:22 +00:00
cutealien 51115e14a1 Add access functions to ITextSceneNode (getText, getTextColor, getFont).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5371 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-20 12:58:01 +00:00
cutealien 021485e272 Merge branch releases/1.8 revisions r5363:r5367 into trunk:
- Increase KEY_KEY_CODES_COUNT to fix problem with laptop keyboards which return the keycode 0xff for the function key.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5368 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-03-16 22:42:01 +00:00
cutealien fef1ec00e7 Merge branch releases/1.8 revisions r5347:r5360 into trunk.
- Fix bug in fast_atof when reading floating point numbers with more than 16 digits past the dot.

Also minor change in .obj loader to add (slightly inexact but still useful) line-numbers internally for debugging.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5361 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-01-27 00:37:53 +00:00
fixeworks 86636f83eb Fixed matrix documentation with info about homgenous coordinates.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5355 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-12-10 10:17:16 +00:00
cutealien 1073bff853 Fix CMetaTriangleSelector and allow creating octrees for single meshbuffers.
CMetaTriangleSelector had been (even more) broken after last check-in,sorry. Now fixed again.
Making octrees triangle selector return meshbuffer information would be possible, but not without some cost or larger rewrite. So instead I've added another workaround - it's now possible to create octress for single meshbuffers. If that makes sense for speed is something users have to check per scene (slower than using a single octree obviously), but at least it's now possible in case someone needs it.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5352 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-12-07 13:30:02 +00:00
cutealien 543e70dc34 CTriangleSelector can now be created for a single meshbuffer.
It can still update with a node transformation, but it won't update when the mesh changes (so only useful for static meshes, not for animated ones).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5351 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-12-06 17:10:57 +00:00
cutealien a20f01131a ITriangleSelector now can also return meshbuffer collision information.
This allows to access materials of colliding triangles.
It's an optional setting (as it can be a little bit slower).
There are new collision functions for users which need that feature.

This also fixes several bugs with MetaTriangleSelectors. Those did sometimes return the wrong nodes in the past (when used with box or line collisions).
Also MetaTriangleSelectors should no longer crash when it has no selectors.

Also box and line collisions will now return all triangles when the colliding node has no inversible matrix  (before it returned the wrong results when for example a node had one axis scaled to 0).

So far only CTriangleSelector uses the new interface to return meshbuffer information. Octree will follow.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5350 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-12-06 16:17:48 +00:00
cutealien a1d75811f0 core::string::split now adds delimiter to token before delimiter when keepSeparators is true. That way we never end up with 2 tokens for an original string with a single character.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5348 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-10-31 15:37:24 +00:00
cutealien 28d2756b27 Bugfix: SMesh::recalculateBoundingBox() does now ignore empty boundingboxes of meshbuffers instead of adding them.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5345 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-10-20 14:01:41 +00:00
cutealien 85e14866a6 IIrrXMLReader::getAttributeValueAsInt and IIrrXMLReader::getAttributeValueAsFloat can now return a custom default-value when the attribute is not found.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5342 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-09-30 13:56:24 +00:00
cutealien 39c0393023 core::string::split now handles ignoreEmptyTokens=false correct (as documented)
Thanks @manni63 for bugreport: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=51551&p=299375#p299375


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5341 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-09-27 19:46:09 +00:00
cutealien e064db1355 Bugfix: Previously when some material had a texture matrix and another didn't those materials were still considered identical. Which had prevented correct switching between materials with and without texture matrices.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5340 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-09-26 12:35:35 +00:00
cutealien 1a98841268 IWriteFile::write now returning size_t.
Interface is now like fwrite (from standard c-lib). 
Also sizeToWrite parameter changed from u32 to size_t.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5334 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-09-08 20:31:15 +00:00
cutealien 1756e4700d IReadFile::read now returning size_t (like fread in c-lib) instead of s32. Also sizeToRead parameter changed from u32 to size_t.
(corresponding change to IWriteFile::write is planned for next days)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5333 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-09-07 22:01:04 +00:00
cutealien d3ac819504 Fix several bugs in multibyteToWString. This also fixes pasting.
Add clear function to strings.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5332 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-08-24 21:18:42 +00:00
cutealien 808240cf98 SceneCollisionManager now using const camera pointers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5328 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-08-13 15:56:49 +00:00
cutealien bff50c751d Spelling fixes.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5327 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-08-13 12:50:06 +00:00
cutealien 2c64159436 Merge branch releases/1.8 revisions 5286:5301 into trunk:
- Deprecate CMatrix4::transformBox
 - Fix CSceneCollisionManager::getPickedNodeBB which could sometimes miss collisions.
 - Get lights and renderTargetTexture tests working again on Windows 10


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5302 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-05-27 19:35:22 +00:00
cutealien d7a700e44f Several getter functions in IAttributes made const (thx @Erik Schultheis for the patch)
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5293 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-03-27 01:07:44 +00:00
nadro c6f5e6d972 - Replaced ITexture::lock 'mipmapLevel' param by 'layer' param.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5279 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-03-13 19:37:13 +00:00