Drop _IRR_MATERIAL_MAX_TEXTURES_

This commit is contained in:
numzero 2023-02-22 20:21:27 +03:00
parent a0e1e39ea7
commit 8efd4527f6
4 changed files with 7 additions and 30 deletions

View File

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

View File

@ -20,10 +20,6 @@
#include <stdio.h> // 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

View File

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

View File

@ -53,8 +53,8 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& 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);