From 567f8688e2dfc1b9d699a7e824b839b594933f7b Mon Sep 17 00:00:00 2001 From: cutealien Date: Wed, 18 Oct 2023 16:51:56 +0000 Subject: [PATCH] Mention in more places that ECFN_DISABLED disables zwrite as well Easy to miss... git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6564 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/SMaterial.h | 2 +- source/Irrlicht/CNullDriver.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/SMaterial.h b/include/SMaterial.h index 15a00482..d77727f7 100644 --- a/include/SMaterial.h +++ b/include/SMaterial.h @@ -473,7 +473,7 @@ namespace video //! Is the zbuffer writable or is it read-only. Default: EZW_AUTO. /** If this parameter is not EZW_OFF, you probably also want to set ZBuffer - to values other than ECFN_DISABLED */ + to values other than ECFN_DISABLED (which disables the zbuffer completely) */ E_ZWRITE ZWriteEnable:3; //! Is backface culling enabled? Default: true diff --git a/source/Irrlicht/CNullDriver.h b/source/Irrlicht/CNullDriver.h index 1570ee5d..489a0ae1 100644 --- a/source/Irrlicht/CNullDriver.h +++ b/source/Irrlicht/CNullDriver.h @@ -747,6 +747,8 @@ namespace video return (f32) getAverage ( p[(y * pitch) + x] ); } + // Check if z-writing should be enabled + // Note: If ZBuffer is disabled completely with ECFN_DISABLED it will still do nothing inline bool getWriteZBuffer(const SMaterial& material) const { switch ( material.ZWriteEnable )