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
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
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
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
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
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
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
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
- 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
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
(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
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
- 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
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
- 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
- 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
- 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
- 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
- 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
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
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
- 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
- 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
(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
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
- 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
- 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
- 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
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