Commit Graph

347 Commits (master)

Author SHA1 Message Date
cutealien fd155bead0 Add operator[] to vector2d and vector3d
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5841 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-07-23 15:30:50 +00:00
cutealien 8db58f1505 Add more GL functions and function-pointers to OpenGLExtensionHandler.
Thx @ criss and devsh for this patch (got applied with minor adaptions).
New functions are about functions using new direct state access functions from GL 4.5
And array textures.
Not yet used internally in the engine (but possible to access it with some hacks from apps, we probably should make the extension handler public at some point).

Also now using glActiveTexture as default instead of glActiveTextureARB.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5818 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-30 15:58:35 +00:00
cutealien 1a6d8e2913 Replace polygon offsetting in SMaterial with a new implementation.
Deprecate PolygonOffsetFactor and PolygonOffsetDirection in SMaterial.
Replace it by PolygonOffsetDepthBias and PolygonOffsetSlopeScale.
Old values still work for now (as well as they did), but will be removed after Irrlicht 1.9.
The old implementation was based a lot on the way Direct3D8 had worked.
- We only had values -1 and 1 for the slope bias before, but sometimes other values are necessary.
- An int value for PolygonOffsetFactor couldn't worked for Direct3D9 which (unlike D3D8) uses a value range of -1 to 1. 
Thx @ Criss and devsh for implementing some code which showed that different slope scaling is sometimes needed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5817 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-05-29 19:48:08 +00:00
cutealien 31652f6577 Add function string::insert.
(more overloads for it can be added later).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5788 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-03-15 13:03:03 +00:00
cutealien ba391682b0 Update opengl test-file.
The test which uses it is currently disabled as it has more problems (broken stencil), but this part is fine and probably just changed due to recent opengl fixes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5774 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-02-23 17:48:00 +00:00
cutealien d1bddcc1a2 Fixing SViewFrustum::recalculateBoundingBox and CMatrix4::transformPlane.
SViewFrustum::recalculateBoundingBox no longer includes camera position in the bounding-box. Only using frustum corners now. Thx @DevSH for bugreport & patch.
CMatrix4::transformPlane was calculating the wrong plane-normal before. It added the matrix translation and also didn't normalize the normal.
planeMatrix tests had been checking for wrong results (did check calculations by hand now, so hopefully I got it right, anyone double-checking it for me would certainly be cool...)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5773 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-02-22 18:03:34 +00:00
cutealien a96b81dd4a Adapted orthoCam test to use OpenGL projection matrices with driver.
It fails, but it failed before (test is outcommented since a long time, will have to check why)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5770 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-02-21 17:16:57 +00:00
cutealien 3283b96087 Fix SViewFrustum::setFrom for OGL projection matrices.
SViewFrustum::setFrom now sets the correct near clipping plane when the projection matrix doesn't use a target depth range of 0 to z, but for example -z to z.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5766 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-02-20 18:55:37 +00:00
cutealien 9a04806c45 Add irr::string::eraseTrailingFloatZeros to kick out trailing 0's for strings generated from floats.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5719 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-31 19:02:14 +00:00
cutealien ff54728feb Add some tests for string::findLastCharNotInList.
All worked out, was just checking ;-)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5718 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-31 18:08:34 +00:00
cutealien 957d34ff0e Switch Irrlicht to 8 textures per Material as default by increasing value of _IRR_MATERIAL_MAX_TEXTURES_.
Reason is that 4 haven't been enough anymore for even pretty common graphic pipelines for a while now. 
8 might still not be enough, but let's see first if people are happy with it.

This has some costs for people not needing more textures, as we have fatter Materials now. 
- Memory usage increases by 64 bytes per SMaterial.
- Serialization files for the irr-format are now larger. 
- Slight speed cost, thought mainly in debug

For people who don't need this and want to avoid some of the costs there is a new variable irr::video::MATERIAL_MAX_TEXTURES_USED which can be set to the maximal number of textures a project will need
before creating any device. This avoids pretty much all speed-costs involved with this change.

Software drivers are not much affected as they use their own texture-limits (2).

I did a few speed-comparison with varying numbers of _IRR_MATERIAL_MAX_TEXTURES_. The numbers displayed are FPS, so higher is better. I had 2 tests - one which forced many material changes and the other used a single material for all nodes. When there are 2 numbers in a result then I got different (generally lower) FPS when forcing material changes. The test used a simple model with 500 polygons and rendered it 4500 times.
OLD means - before working on all changes related to increasing texture-numbers and without changing materials (found a bunch of places to decrease the impact of this change which also sometimes did speed up Irrlicht generally). 1.8 refers to Irrlicht 1.8 with same test. All tests done on Windows/VisualStudio.

Max.textures    4       8       16      64      64 MATERIAL_MAX_TEXTURES_USED=4
GL/debug        50/68   44/58   35/45
GL/release      117     117     117     80/100  117	
D3D9/debug	51/56	45/49	37/39				
D3D9/release    168     168     152/168 90/87   168
OLD GL/debug    63
OLD GL/release  117
OLD D3D9/debug  44
OLD D3D9/rel    168
1.8 GL/debug    23/29
1.8 GL/release  94/117
1.8 D3D9/debug  59/63
1.8 D3D9/rel    142/152

Take all results with a grain of salt, it probably often is limited by fill-rate and doesn't even notice the texture-number changes (especially in release). 

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5682 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-17 15:34:57 +00:00
cutealien 60b295bcdb Can't avoid writing empty textures or SMaterial.
I changed that while fixing SMaterial serialization, but bad optimization. Editors needs the info even when it's empty or it can't offer options to user.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5681 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-17 14:32:03 +00:00
cutealien 6bf700d408 Remove compile warnings.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5680 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-17 14:24:11 +00:00
cutealien abd0fa9dec Fix several problems with SMaterial serialization.
SMaterial.ZWriteFineControl only using 1 bit now.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5679 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-17 14:19:18 +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 7873503041 Fix test "renderTargetTexture"
Was using wrong parameter order when setting the rendertarget.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5660 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-11-19 21:50:24 +00:00
cutealien 413a5b2504 Add some documentation about the workings of the attribute system.
(I hope I figured it out all correct)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5574 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-08 22:19:35 +00:00
cutealien 7a87a77a8a Document some bug/missing feature in the serializeAttributes tests.
(stringw arrays can't serialize to/from strings - that's ignored silently at the moment, not yet tested if/how it works in combination with xml-reader, but that one should or other tests would fail).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5572 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-11-07 00:30:49 +00:00
cutealien 4f56eecd61 Simplify code in testUtils and get line2d.cpp tp compile in MinGW.
Thanks at AReichl for info about simplifying testUtils.cpp (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=46207&start=15)
line2d had some custom random-generator which caused problems, but it wasn't used anyway, so got removed now.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5402 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-06 20:50:05 +00:00
fixeworks fd6a5a12c7 Added test file for line2d.cpp.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5400 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-04 10:50:03 +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 7bacbb0873 Append a sort test to the array tests.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5364 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-02-21 21:16:34 +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
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 14a41bbc61 Update to libpng 1.6.23 (from 1.6.21).
Vendors and 1.8 branch updated.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5314 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-07-09 09:19:03 +00:00
cutealien 666feee11e Merge branch releases/1.8 revisions r5302:r5310 into trunk:
- Tests on Unix now have a short pause between switching drivers to avoid certain X11 errors.
 - Fix CEnumAttribute::getInt() which could crash  (thx @ luthyr for reporting)
 - No longer try to run tests for drivers not supported on a platform


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5311 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-07-08 20:41:42 +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
nadro 64c70e416d - Removed test for lock->modify->unlock mipmaps (this feature is no longer supported in the engine).
- Added test for lock->modify->unlock cubemap.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5280 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-03-14 21:48:42 +00:00
cutealien 3393d907fe Update scene test files.
(Scene serialization had been extended in the past)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5273 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-03-09 15:01:41 +00:00
nadro c0e1680f2e - Changed method name from:
bool IVideoDriver::setRenderTarget(IRenderTarget* target, ...);
 to:
 bool IVideoDriver::setRenderTargetEx(IRenderTarget* target, ...);
- Replaced some deprecated methods in tests.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5223 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-12-17 14:42:09 +00:00
nadro 3fe418bc41 - Removed texture IDs parameter from IVideoDriver::setRenderTarget method. Performance gain was too low to keep this parameter available.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5152 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-10-16 08:47:55 +00:00
nadro 07a7d9ee2e - Added clear buffer flags.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5151 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-10-15 18:20:06 +00:00
cutealien 7f8604ca93 Merge branch releases/1.8 revisions 5140:5149 into trunk:
- Add warning in tests when stabilizing screenshots fails 
(Note - it still fails sometimes, just less now with trying to get a good screenshot)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5150 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-10-06 20:48:42 +00:00
nadro eef7353833 - Added projects for Visual Studio 2014. Due to a problems with Windows7.1 SDK on Windows 10 those projects are recommended for users of this OS.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5148 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-10-01 22:59:08 +00:00
cutealien b3ba72ab74 Merge branch releases/1.8 revisions 5129:5140 into trunk:
- Set the platform SDK for VS2010 and VS 2012 throughout to Windows7.1SDK
- Fix the fix for compiling on GCC5


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5141 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-09-20 11:19:26 +00:00
cutealien 19435a22f4 - Fix: CGUIImage no longer scales wrong when working with textures which don't have the original image size.
- Fix CSoftwareTexture2 calculation for OriginalSize of ITexture. It had returned the changed texture size instead of the original one.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5138 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-09-16 21:11:30 +00:00
cutealien c6eec21cec Cameras return again an empty boundingbox (at 0,0,0) instead of returning the frustum boundingbox. Thx @robmar for reporting this.
You can still access the frustum boundingbox through the frustum itself.
Also CSceneCollisionManager collision functions ignore now empty collision boxes.
This means cameras no longer show up in the node-collision of the SceneCollisionManager.
Tests have been adapted correspondingly.
Note that this behavior was once before changed in Irrlicht (rev. 345). But it was one of many changes and there was no documentation or log-message about why anyone would like
the cameras to show up in node-collisions based on their frustum boundingbox. Without any hints about the why I decided to change it back as it's just confusing.



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5094 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-19 19:55:07 +00:00
cutealien df7fd7873e Remove D3D8 tests.
Move ECOLOR_FORMAT enums added in r4984 to the end (adding in them in the middle can mess with serialization).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5092 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-15 21:04:01 +00:00
cutealien ce863d1037 Update test drawVertexPrimitives
- new media for OpenGL-drawVPL_h. This test is about finding out if things changed, and this result has been like it is now at least since 1.8
- required match can be reduce for this test, as minor aliasing artifacts always are different between cards and don't matter here.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5090 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-11 16:08:54 +00:00
cutealien 9fc25d9648 Update tests media.
- viePortText has improved according to Thomas
- flyCircleAnimator... again brightness differences (maybe due to latest material fixes). If that comes up again will have to investigate further.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5088 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-11 13:20:41 +00:00
cutealien 69810d0e1a Fix bug in atof test. Thx @cerf for reporting.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5087 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-10 16:37:25 +00:00
cutealien 3871ba4ae5 Remove D3D8 test media.
No longer needed due to dx8 removal.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5085 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-09 20:30:31 +00:00
cutealien 0d767d4206 Update test-media for 2dmaterial test and burnings
(new result looks better, media just didn't get updated when it was changed).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5084 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-09 12:22:55 +00:00
cutealien a1cf2945fe Update test-media for a test where the result is fine.
This is only about position of image elements and it failed because elements are now a little brighter. Probably due to some fix in the driver at some point, but not related to this test.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5075 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-06 14:54:51 +00:00
nadro ed12a085f3 - Removed old IVideoDriver::setRenderTarget method.
- Fixed OpenGL RTT.
- Fixed compilation issues in some unit tests.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5072 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-03-31 19:07:17 +00:00
cutealien 77ec2c2bc3 Remove DX8 references from tests.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5069 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-03-23 20:44:22 +00:00
nadro ae476a0dc3 - Updated changes.txt.
- Removed project files for Dev-C++ and Visual Studio 2008 and older.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5022 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-01-11 20:20:12 +00:00
nadro 1300c4df95 - Added Visual Studio 2013 project files.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5021 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-01-11 20:11:21 +00:00
cutealien f591a5acde Merge branch releases/1.8 revisions 4828:4923 into trunk:
- Fix bug with multiple SetPixelFormat calls.
- Fixed bug related to memory release in PNG image loader. Thanks elephoenix for it.
- Fix crash in CGUIListBox when users pressed end key folled by any other key in an empty, focused list box (thanks at porcus for report and patch).
- Fix use of enabling defines for wal2 (halflife) image loader. Thanks to hendu for noticing.
- Fix proper screenshot creation in test by inserting the stabilizeScreenBackground call.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4925 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-09-17 16:00:52 +00:00
cutealien bf42d8d61b Fix serializing colors as strings and add a general test for serializing attributes as strings.
Had been 2 bugs in CColorAttribute playing together:
First was that getString was not overloaded so it used the CNumbersAttribute values instead.
Second was that setString used the wrong check when it got a number-array string, so the fallback for those strings had failed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4812 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-04-29 15:59:53 +00:00