From: numzero Date: Wed, 22 Feb 2023 17:21:27 +0000 (+0300) Subject: Drop _IRR_MATERIAL_MAX_TEXTURES_ X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=8efd4527f6553747384858da420bfab53c23e1e5;p=irrlicht.git Drop _IRR_MATERIAL_MAX_TEXTURES_ --- diff --git a/include/IVideoDriver.h b/include/IVideoDriver.h index a8cea13..e3ea221 100644 --- a/include/IVideoDriver.h +++ b/include/IVideoDriver.h @@ -56,32 +56,13 @@ namespace video ETS_WORLD, //! Projection transformation ETS_PROJECTION, - //! Texture transformation + //! Texture 0 transformation + //! Use ETS_TEXTURE_0 + texture_number to access other texture transformations ETS_TEXTURE_0, - //! Texture transformation + //! Texture 1 transformation ETS_TEXTURE_1, - //! Texture transformation - ETS_TEXTURE_2, - //! Texture transformation - ETS_TEXTURE_3, -#if _IRR_MATERIAL_MAX_TEXTURES_>4 - //! Texture transformation - ETS_TEXTURE_4, -#if _IRR_MATERIAL_MAX_TEXTURES_>5 - //! Texture transformation - ETS_TEXTURE_5, -#if _IRR_MATERIAL_MAX_TEXTURES_>6 - //! Texture transformation - ETS_TEXTURE_6, -#if _IRR_MATERIAL_MAX_TEXTURES_>7 - //! Texture transformation - ETS_TEXTURE_7, -#endif -#endif -#endif -#endif //! Only used internally - ETS_COUNT = ETS_TEXTURE_0 + _IRR_MATERIAL_MAX_TEXTURES_ + ETS_COUNT = ETS_TEXTURE_0 + MATERIAL_MAX_TEXTURES }; //! Special render targets, which usually map to dedicated hardware diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index d186a2c..0271289 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -20,10 +20,6 @@ #include // TODO: Although included elsewhere this is required at least for mingw - -//! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht. -#define _IRR_MATERIAL_MAX_TEXTURES_ 4 - #ifdef _WIN32 #define IRRCALLCONV __stdcall #else diff --git a/include/SMaterial.h b/include/SMaterial.h index 43dadb6..92dc822 100644 --- a/include/SMaterial.h +++ b/include/SMaterial.h @@ -280,7 +280,7 @@ namespace video /** SMaterial might ignore some textures in most function, like assignment and comparison, when SIrrlichtCreationParameters::MaxTextureUnits is set to a lower number. */ - const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_; + const u32 MATERIAL_MAX_TEXTURES = 4; //! Struct for holding parameters for a material renderer // Note for implementors: Serialization is in CNullDriver diff --git a/source/Irrlicht/CNullDriver.cpp b/source/Irrlicht/CNullDriver.cpp index 5834e01..2cbd47c 100644 --- a/source/Irrlicht/CNullDriver.cpp +++ b/source/Irrlicht/CNullDriver.cpp @@ -53,8 +53,8 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d& scre #endif DriverAttributes = new io::CAttributes(); - DriverAttributes->addInt("MaxTextures", _IRR_MATERIAL_MAX_TEXTURES_); - DriverAttributes->addInt("MaxSupportedTextures", _IRR_MATERIAL_MAX_TEXTURES_); + DriverAttributes->addInt("MaxTextures", MATERIAL_MAX_TEXTURES); + DriverAttributes->addInt("MaxSupportedTextures", MATERIAL_MAX_TEXTURES); DriverAttributes->addInt("MaxAnisotropy", 1); // DriverAttributes->addInt("MaxUserClipPlanes", 0); // DriverAttributes->addInt("MaxAuxBuffers", 0);