Commit Graph

216 Commits (1b4444e044d1a821a78e4533c411ce8bc292d68f)

Author SHA1 Message Date
cutealien 1b4444e044 Remove E_GPU_SHADING_LANGUAGE in IGPUProgrammingServices.
Thx @greenya for noticing this is no longer needed as it was only ever used for the CG shader language which we kicked out already.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5846 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-08-15 20:43:50 +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 f34b03f4bd Add MATERIAL_MAX_TEXTURES_USED to allow setting a limit of used textures in materials.
CD3D9Driver::setTransform limits no longer to MATERIAL_MAX_TEXTURES, but to MaxTextureUnits.
COpenGLCoreFeature::TextureUnit renamed to COpenGLCoreFeature::MaxTextureUnits (same as Direc3D names it and slightly better description)
Limiting used texture numbers with MATERIAL_MAX_TEXTURES_USED is currently not making a big speed difference. But it has a more noticable effect when we increase _IRR_MATERIAL_MAX_TEXTURES_ soon. It allows software which doesn't need more textures to mostly keep old speed.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5678 dfc29bdd-3216-0410-991c-e03cc46cb475
2019-01-16 21:18:43 +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 243c124d85 Try restoring a lost device for 4 instead of 3 seconds. Better error messages for failed CreateTexture calls.
(time of restoring device is try&error really, with 3 seconds it seemed to work sometimes, but still failed in some cases, so just increasing it slightly to see if helps).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5649 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-10-19 13:39:20 +00:00
cutealien 10a3f02aa6 Try recovering lost device in D3D9 for 3 seconds when device reset fails after resizing Window.
The device becomes useless if we don't recover it, so it's worth giving it a few more shots at that point as it might take a while until it can be recovered. The 3 seconds are just a number which seems to make some sense, could be it would be worth waiting even longer?

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5640 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-09-04 14:20: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 f41aad6c6d No longer try to restore RTT's with a lost device.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5626 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-07-04 17:56:38 +00:00
cutealien f873cd7916 Do no longer release DepthStencilSurface always in D3D9 device and then still work with it.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5625 dfc29bdd-3216-0410-991c-e03cc46cb475
2018-07-04 17:50:34 +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 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 41722cee0d Improve speed of draw3DBox on D3D9.
Thanks @zerochen for patch (https://sourceforge.net/p/irrlicht/patches/256)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5396 dfc29bdd-3216-0410-991c-e03cc46cb475
2017-04-02 15:53:50 +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
nadro 3c57e01700 - Fixed issue with support 8+ textures in D3D9.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5295 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-04-02 10:51:33 +00:00
nadro 909e7ca9c3 - Added support for cubemap lock in OpenGL.
- Enabled cubemaps feature in D3D9.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5281 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-03-15 00:05:21 +00:00
nadro d72c407efa - Fixed issue with DXT file formats in D3D9.
- Added cube maps support to PVR file loader.
- Added support for load cube maps directly via IVideoDriver::getTexture call.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5259 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-02-14 16:59:04 +00:00
nadro 48e75f34c8 - Fixed issue with CurrentRenderTargetSize vs. CurrentRendertargetSize. Thanks cheqnk for report.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5255 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-02-13 11:07:38 +00:00
nadro 453d24cf2e - Added TextureWrapW field to SMaterialLayer.
- Improved IRenderTarget::setTexture warnings.
- Minor improvements for textures in D3D9 and OpenGL drivers.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5241 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-01-10 20:37:54 +00:00
nadro 472a30e4c4 - Fixed crash in CD3D9RenderTarget::generateSurfaces(). Thx CuteAlien for report.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5240 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-01-10 13:07:52 +00:00
nadro 81a4c3d980 - Added cubemaps support for D3D9.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5239 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-01-09 23:16:41 +00:00
nadro e12ef3a41a - Changes for D3D9 texture code (at now it looks like OpenGL texture code). Those changes was required for upcoming cubemaps support.
- Minor improvements in COGLCoreTexture.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5237 dfc29bdd-3216-0410-991c-e03cc46cb475
2016-01-09 21:54:37 +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 2b553bee89 - Added new color formats (this feature was available in ogl-es branch before):
* ECF_PVRTC_RGB2
 * ECF_PVRTC_ARGB2
 * ECF_PVRTC_RGB4
 * ECF_PVRTC_ARGB4
 * ECF_PVRTC2_ARGB2
 * ECF_PVRTC2_ARGB4
 * ECF_ETC1
 * ECF_ETC2_RGB
 * ECF_ETC2_ARGB
- Added PVR image loader with support for DXT*, PVRTC* and ETC* color formats.(this feature was available in ogl-es branch before)
- Fixed issue with mipmaps in DDS loader.
- Fixed minor issue with texture cubemap in OpenGL.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5192 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-11-28 00:03:29 +00:00
nadro f631c9cb96 - Added cubemap texture support for OpenGL driver.(this feature was available in ogl-es branch before)
- Minor improvements in texture creation process.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5190 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-11-26 23:03:24 +00:00
nadro 609eba77bf - Improved mipmaps handling (this modification was required for better support of cube maps and texture arrays in near future).
- Set IImage::lock and IImage::unlock methods as deprecated (those method names was wrong, IImage::unlock did nothing...). Please use IImage::getData method instead of older alternatives.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5168 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-11-01 14:24:15 +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
nadro cc6cae2e68 - Fixed issue related to D3D9 device lost and broken blending. Thanks CuteAlien for report this bug.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5080 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-07 22:13:57 +00:00
nadro b99b829863 - Fixed issue related to D3D9 device lost and broken render targets. Thanks CuteAlien for report this bug.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5078 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-07 20:27:26 +00:00
nadro 9c337089f8 - Fixed issue with null pointer.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5077 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-06 21:41:49 +00:00
cutealien d2169fc4a5 Add a new flag for controlling zbuffer writing to SMaterial.
In 4774 we tried fixing zwriting for shader materials as those are ignored in SMaterial::isTransparent.
This affected too many existing projects and made it hard to still write to zbuffer in some situations where it was necessary. So trying now another approach which brings back old functionality mostly, but allows users to have more fine-control with a new flag. Using an enum instead of bool for the new flag as it's foreseeable that more options might be necessary for this in the future.
Note: Several tests are currently failing, but they did that before, so that has to be debugged on it's own.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5076 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-06 15:20:06 +00:00
nadro b23954ebef - Fixed issue with simplified IVideoDriver::setRenderTarget method.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5074 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-01 17:33:52 +00:00
cutealien a0e403fcdc Add setRenderTarget interface taking an ITexture back in as wrapper.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5073 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-04-01 11:01:19 +00:00
nadro 538751d85c - Added new IRenderTarget interface.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5068 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-03-23 19:00:17 +00:00
cutealien 1fa7e87f5e NVidia CG support removed due to lack of maintenance.
Note, I would have liked to get it compiling again a last time, but it was referring to a class which didn't exists, so I didn't know what to make of that.
NVidia has also stopped supporting this by the way.
No changes for MacOSX project files, so those still might have to be fixed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5046 dfc29bdd-3216-0410-991c-e03cc46cb475
2015-02-28 20:11:40 +00:00
nadro ed321197a7 - Solved issue related to crash at screenshot unit test.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4991 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-12-04 18:37:52 +00:00
nadro cae43ac658 - Fixed compilation issues.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4987 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-11-16 00:18:22 +00:00
nadro 199aec1fb1 - Fixed methods related to RTT in D3D9 and Software Drivers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4985 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-11-07 21:48:16 +00:00
nadro b5ade26c98 - Fixed issue with BlendFactor in D3D8, D3D9 and OpenGL drivers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4883 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-05-26 16:39:06 +00:00
nadro 9bad8de603 - Added separate blending support for both OpenGL and D3D9.
- Added blend factor to SMaterial.
- Improved transparent nodes handling.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4794 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-04-25 01:19:38 +00:00
nadro d79745a7fc - Minor improvements in D3D8/D3D9 blend operation mechanism.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4785 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-04-21 16:58:25 +00:00
nadro ea41a9146f - Remove force blending mechanism and improve blending handling in material renderers.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4775 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-04-16 21:31:52 +00:00
nadro de6df498e6 Fixed issue with wrongly enabled Z-writing for transparent shader materials. Thanks Hendu for this fix.
Fixed issue with missing blending when transparent shader material is used with blending operation set to EBO_NONE.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4774 dfc29bdd-3216-0410-991c-e03cc46cb475
2014-04-15 18:21:23 +00:00
nadro 1b37134284 - revert rotation patch from rev4478. Texture Matrix will be default solution for manipulate 2d image drawing.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4480 dfc29bdd-3216-0410-991c-e03cc46cb475
2013-03-18 16:19:02 +00:00
nadro 5f4c2795ef - Added support for rotation 2D images. This patch base on FuzzYspo0N patch from irrEXT. (Software drivers aren't supported).
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4478 dfc29bdd-3216-0410-991c-e03cc46cb475
2013-03-16 03:03:15 +00:00
nadro 96a10f2d2f - Fixed some methods and variables names in IImage/CImage classes.
- Added query feature related to DXT compressed textures.
- Added compressed textures support for D3D9.
- Fixed minor bugs in OpenGL related to compressed textures handling.
- Properly handle compressed textures in D3D8 and Software drivers (Those drivers doesn't support compressed textures).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4450 dfc29bdd-3216-0410-991c-e03cc46cb475
2013-01-26 02:28:41 +00:00
nadro f9d0f81342 - Fixed blending issues in example no. 08 (OpenGL driver).
- Added ECFN_DISABLED value (it works like ECFN_NEVER worked before) and changed ECFN_NEVER behaviour (it works like its equivalent value in OpenGL/Direct3D).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4424 dfc29bdd-3216-0410-991c-e03cc46cb475
2013-01-03 05:07:17 +00:00
nadro 5457c5e5b9 - Added vertex texture support to D3D9 driver.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4422 dfc29bdd-3216-0410-991c-e03cc46cb475
2012-12-31 17:58:09 +00:00
nadro 165b266bef - Fixed problem with dynamic_cast.
- Restored const-correctness for draw2DImage methods (it was changed in previous revision).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4405 dfc29bdd-3216-0410-991c-e03cc46cb475
2012-12-18 14:31:15 +00:00
nadro 6238406ccd - Improve OpenGL calls cache (This may be unstable revision, require more tests). Cache will be improved further in close future.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4404 dfc29bdd-3216-0410-991c-e03cc46cb475
2012-12-18 03:30:52 +00:00