1
0

Merging r6337 through r6363 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6379 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2022-05-04 21:26:18 +00:00
parent 2d63fdba3d
commit 993f990036
28 changed files with 439 additions and 328 deletions

View File

@@ -289,9 +289,8 @@ namespace video
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.
material comparisons 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_.
@@ -318,63 +317,6 @@ namespace video
FogEnable(false), NormalizeNormals(false), UseMipMaps(true)
{ }
//! Copy constructor
/** \param other Material to copy from. */
SMaterial(const SMaterial& other)
{
// These pointers are checked during assignment
for (u32 i=0; i<MATERIAL_MAX_TEXTURES_USED; ++i)
TextureLayer[i].TextureMatrix = 0;
*this = other;
}
//! Assignment operator
/** \param other Material to copy from. */
SMaterial& operator=(const SMaterial& other)
{
// Check for self-assignment!
if (this == &other)
return *this;
MaterialType = other.MaterialType;
AmbientColor = other.AmbientColor;
DiffuseColor = other.DiffuseColor;
EmissiveColor = other.EmissiveColor;
SpecularColor = other.SpecularColor;
Shininess = other.Shininess;
MaterialTypeParam = other.MaterialTypeParam;
MaterialTypeParam2 = other.MaterialTypeParam2;
Thickness = other.Thickness;
for (u32 i=0; i<MATERIAL_MAX_TEXTURES_USED; ++i)
{
TextureLayer[i] = other.TextureLayer[i];
}
Wireframe = other.Wireframe;
PointCloud = other.PointCloud;
GouraudShading = other.GouraudShading;
Lighting = other.Lighting;
ZWriteEnable = other.ZWriteEnable;
BackfaceCulling = other.BackfaceCulling;
FrontfaceCulling = other.FrontfaceCulling;
FogEnable = other.FogEnable;
NormalizeNormals = other.NormalizeNormals;
ZBuffer = other.ZBuffer;
AntiAliasing = other.AntiAliasing;
ColorMask = other.ColorMask;
ColorMaterial = other.ColorMaterial;
BlendOperation = other.BlendOperation;
BlendFactor = other.BlendFactor;
PolygonOffsetFactor = other.PolygonOffsetFactor;
PolygonOffsetDirection = other.PolygonOffsetDirection;
PolygonOffsetDepthBias = other.PolygonOffsetDepthBias;
PolygonOffsetSlopeScale = other.PolygonOffsetSlopeScale;
UseMipMaps = other.UseMipMaps;
return *this;
}
//! Texture layer array.
SMaterialLayer TextureLayer[MATERIAL_MAX_TEXTURES];