Remove deprecated functionality of SMaterial

This commit is contained in:
Caleb Butler
2023-09-03 19:10:03 -04:00
committed by sfan5
parent 364cb37698
commit 00dd1f8ef3
3 changed files with 20 additions and 60 deletions

View File

@ -228,19 +228,6 @@ namespace video
ECM_DIFFUSE_AND_AMBIENT
};
//! DEPRECATED. Will be removed after Irrlicht 1.9.
/** Flags for the definition of the polygon offset feature. These flags define whether the offset should be into the screen, or towards the eye. */
enum E_POLYGON_OFFSET
{
//! Push pixel towards the far plane, away from the eye
/** This is typically used for rendering inner areas. */
EPO_BACK=0,
//! Pull pixels towards the camera.
/** This is typically used for polygons which should appear on top
of other elements, such as decals. */
EPO_FRONT=1
};
//! Names for polygon offset direction
const c8* const PolygonOffsetDirectionNames[] =
{
@ -289,17 +276,17 @@ namespace video
{
public:
//! Default constructor. Creates a solid, lit material with white colors
SMaterial()
: MaterialType(EMT_SOLID), AmbientColor(255,255,255,255), DiffuseColor(255,255,255,255),
EmissiveColor(0,0,0,0), SpecularColor(255,255,255,255),
Shininess(0.0f), MaterialTypeParam(0.0f), Thickness(1.0f),
ZBuffer(ECFN_LESSEQUAL), AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL),
ColorMaterial(ECM_DIFFUSE), BlendOperation(EBO_NONE), BlendFactor(0.0f),
PolygonOffsetFactor(0), PolygonOffsetDirection(EPO_FRONT),
PolygonOffsetDepthBias(0.f), PolygonOffsetSlopeScale(0.f),
Wireframe(false), PointCloud(false), GouraudShading(true),
Lighting(true), ZWriteEnable(EZW_AUTO), BackfaceCulling(true), FrontfaceCulling(false),
FogEnable(false), NormalizeNormals(false), UseMipMaps(true)
SMaterial() :
MaterialType(EMT_SOLID), AmbientColor(255, 255, 255, 255),
DiffuseColor(255, 255, 255, 255), EmissiveColor(0, 0, 0, 0),
SpecularColor(255, 255, 255, 255), Shininess(0.0f),
MaterialTypeParam(0.0f), Thickness(1.0f), ZBuffer(ECFN_LESSEQUAL),
AntiAliasing(EAAM_SIMPLE), ColorMask(ECP_ALL), ColorMaterial(ECM_DIFFUSE),
BlendOperation(EBO_NONE), BlendFactor(0.0f), PolygonOffsetDepthBias(0.f),
PolygonOffsetSlopeScale(0.f), Wireframe(false), PointCloud(false),
GouraudShading(true), Lighting(true), ZWriteEnable(EZW_AUTO),
BackfaceCulling(true), FrontfaceCulling(false), FogEnable(false),
NormalizeNormals(false), UseMipMaps(true)
{ }
//! Texture layer array.
@ -385,28 +372,16 @@ namespace video
//! Store the blend factors
/** textureBlendFunc/textureBlendFuncSeparate functions should be used to write
properly blending factors to this parameter.
Due to historical reasons this parameter is not used for material type
properly blending factors to this parameter.
Due to historical reasons this parameter is not used for material type
EMT_ONETEXTURE_BLEND which uses MaterialTypeParam instead for the blend factor.
It's generally used only for materials without any blending otherwise (like EMT_SOLID).
It's main use is to allow having shader materials which can enable/disable
blending after they have been created.
It's main use is to allow having shader materials which can enable/disable
blending after they have been created.
When you set this you usually also have to set BlendOperation to a value != EBO_NONE
(setting it to EBO_ADD is probably the most common one value). */
f32 BlendFactor;
//! DEPRECATED. Will be removed after Irrlicht 1.9. Please use PolygonOffsetDepthBias instead.
/** Factor specifying how far the polygon offset should be made.
Specifying 0 disables the polygon offset. The direction is specified separately.
The factor can be from 0 to 7.
Note: This probably never worked on Direct3D9 (was coded for D3D8 which had different value ranges) */
u8 PolygonOffsetFactor:3;
//! DEPRECATED. Will be removed after Irrlicht 1.9.
/** Flag defining the direction the polygon offset is applied to.
Can be to front or to back, specified by values from E_POLYGON_OFFSET. */
E_POLYGON_OFFSET PolygonOffsetDirection:1;
//! A constant z-buffer offset for a polygon/line/point
/** The range of the value is driver specific.
On OpenGL you get units which are multiplied by the smallest value that is guaranteed to produce a resolvable offset.
@ -438,7 +413,7 @@ namespace video
bool Lighting:1;
//! 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
/** If this parameter is not EZW_OFF, you probably also want to set ZBuffer
to values other than ECFN_DISABLED */
E_ZWRITE ZWriteEnable:2;
@ -546,8 +521,6 @@ namespace video
ColorMaterial != b.ColorMaterial ||
BlendOperation != b.BlendOperation ||
BlendFactor != b.BlendFactor ||
PolygonOffsetFactor != b.PolygonOffsetFactor ||
PolygonOffsetDirection != b.PolygonOffsetDirection ||
PolygonOffsetDepthBias != b.PolygonOffsetDepthBias ||
PolygonOffsetSlopeScale != b.PolygonOffsetSlopeScale ||
UseMipMaps != b.UseMipMaps