diff --git a/include/SMaterial.h b/include/SMaterial.h index 295cfbd..9874d77 100644 --- a/include/SMaterial.h +++ b/include/SMaterial.h @@ -282,23 +282,6 @@ namespace video */ const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_; - //! By default this is identical to MATERIAL_MAX_TEXTURES - /** Users can modify this value if they are certain they don't need all - available textures per material in their application. For example if you - never need more than 2 textures per material you can set this to 2. - - We (mostly) avoid dynamic memory in SMaterial, so the extra memory - will still be allocated. But by lowering MATERIAL_MAX_TEXTURES_USED the - material comparisons and assignments can be faster. Also several other - places in the engine can be faster when reducing this value to the limit - you need. - - NOTE: This should only be changed once and before any call to createDevice. - NOTE: Do not set it below 1 or above the value of _IRR_MATERIAL_MAX_TEXTURES_. - NOTE: Going below 4 is usually not worth it. - */ - IRRLICHT_API extern u32 MATERIAL_MAX_TEXTURES_USED; - //! Struct for holding parameters for a material renderer // Note for implementors: Serialization is in CNullDriver class SMaterial @@ -323,7 +306,7 @@ namespace video SMaterial(const SMaterial& other) { // These pointers are checked during assignment - for (u32 i=0; i(MATERIAL_MAX_TEXTURES)); - Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES_USED)); Feature.ColorAttachment = 1; } diff --git a/source/Irrlicht/COGLESExtensionHandler.cpp b/source/Irrlicht/COGLESExtensionHandler.cpp index 4badf22..4923ada 100644 --- a/source/Irrlicht/COGLESExtensionHandler.cpp +++ b/source/Irrlicht/COGLESExtensionHandler.cpp @@ -82,7 +82,6 @@ namespace video glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, DimAliasedPoint); Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES)); - Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES_USED)); Feature.ColorAttachment = 1; #if defined(_IRR_OGLES1_USE_EXTPOINTER_) diff --git a/source/Irrlicht/COpenGLExtensionHandler.cpp b/source/Irrlicht/COpenGLExtensionHandler.cpp index 8a2ed42..3e5593f 100644 --- a/source/Irrlicht/COpenGLExtensionHandler.cpp +++ b/source/Irrlicht/COpenGLExtensionHandler.cpp @@ -756,7 +756,6 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer) else #endif Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES)); - Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES_USED)); #ifdef GL_ARB_occlusion_query if (FeatureAvailable[IRR_ARB_occlusion_query]) diff --git a/source/Irrlicht/CWebGL1Driver.cpp b/source/Irrlicht/CWebGL1Driver.cpp index 1f0acb1..defa5ac 100644 --- a/source/Irrlicht/CWebGL1Driver.cpp +++ b/source/Irrlicht/CWebGL1Driver.cpp @@ -1097,7 +1097,6 @@ void CWebGL1Driver::initWebGLExtensions() glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, DimAliasedLine); glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, DimAliasedPoint); Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES)); - Feature.MaxTextureUnits = core::min_(Feature.MaxTextureUnits, static_cast(MATERIAL_MAX_TEXTURES_USED)); Feature.ColorAttachment = 1; } diff --git a/source/Irrlicht/Irrlicht.cpp b/source/Irrlicht/Irrlicht.cpp index 0745c5e..1e01651 100644 --- a/source/Irrlicht/Irrlicht.cpp +++ b/source/Irrlicht/Irrlicht.cpp @@ -132,7 +132,6 @@ namespace core namespace video { SMaterial IdentityMaterial; - u32 MATERIAL_MAX_TEXTURES_USED = MATERIAL_MAX_TEXTURES; } } // end namespace irr