Commit 9f47c2ee authored by hybrid's avatar hybrid

Make material flag enum combinable.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2192 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5af050be
...@@ -14,48 +14,48 @@ namespace video ...@@ -14,48 +14,48 @@ namespace video
enum E_MATERIAL_FLAG enum E_MATERIAL_FLAG
{ {
//! Draw as wireframe or filled triangles? Default: false //! Draw as wireframe or filled triangles? Default: false
EMF_WIREFRAME = 0, EMF_WIREFRAME = 0x1,
//! Draw as point cloud or filled triangles? Default: false //! Draw as point cloud or filled triangles? Default: false
EMF_POINTCLOUD, EMF_POINTCLOUD = 0x2,
//! Flat or Gouraud shading? Default: true //! Flat or Gouraud shading? Default: true
EMF_GOURAUD_SHADING, EMF_GOURAUD_SHADING = 0x4,
//! Will this material be lighted? Default: true //! Will this material be lighted? Default: true
EMF_LIGHTING, EMF_LIGHTING = 0x8,
//! Is the ZBuffer enabled? Default: true //! Is the ZBuffer enabled? Default: true
EMF_ZBUFFER, EMF_ZBUFFER = 0x10,
//! May be written to the zbuffer or is it readonly. Default: true //! May be written to the zbuffer or is it readonly. Default: true
/** This flag is ignored, if the material type is a transparent type. */ /** This flag is ignored, if the material type is a transparent type. */
EMF_ZWRITE_ENABLE, EMF_ZWRITE_ENABLE = 0x20,
//! Is backface culling enabled? Default: true //! Is backface culling enabled? Default: true
EMF_BACK_FACE_CULLING, EMF_BACK_FACE_CULLING = 0x40,
//! Is frontface culling enabled? Default: false //! Is frontface culling enabled? Default: false
/** Overrides EMF_BACK_FACE_CULLING if both are enabled. */ /** Overrides EMF_BACK_FACE_CULLING if both are enabled. */
EMF_FRONT_FACE_CULLING, EMF_FRONT_FACE_CULLING = 0x80,
//! Is bilinear filtering enabled? Default: true //! Is bilinear filtering enabled? Default: true
EMF_BILINEAR_FILTER, EMF_BILINEAR_FILTER = 0x100,
//! Is trilinear filtering enabled? Default: false //! Is trilinear filtering enabled? Default: false
/** If the trilinear filter flag is enabled, /** If the trilinear filter flag is enabled,
the bilinear filtering flag is ignored. */ the bilinear filtering flag is ignored. */
EMF_TRILINEAR_FILTER, EMF_TRILINEAR_FILTER = 0x200,
//! Is anisotropic filtering? Default: false //! Is anisotropic filtering? Default: false
/** In Irrlicht you can use anisotropic texture filtering in /** In Irrlicht you can use anisotropic texture filtering in
conjunction with bilinear or trilinear texture filtering conjunction with bilinear or trilinear texture filtering
to improve rendering results. Primitives will look less to improve rendering results. Primitives will look less
blurry with this flag switched on. */ blurry with this flag switched on. */
EMF_ANISOTROPIC_FILTER, EMF_ANISOTROPIC_FILTER = 0x400,
//! Is fog enabled? Default: false //! Is fog enabled? Default: false
EMF_FOG_ENABLE, EMF_FOG_ENABLE = 0x800,
//! Normalizes normals. Default: false //! Normalizes normals. Default: false
/** You can enable this if you need to scale a dynamic lighted /** You can enable this if you need to scale a dynamic lighted
...@@ -63,19 +63,16 @@ namespace video ...@@ -63,19 +63,16 @@ namespace video
will get darker. If you enable the EMF_NORMALIZE_NORMALS flag, will get darker. If you enable the EMF_NORMALIZE_NORMALS flag,
the normals will be normalized again, and the model will look the normals will be normalized again, and the model will look
as bright as it should. */ as bright as it should. */
EMF_NORMALIZE_NORMALS, EMF_NORMALIZE_NORMALS = 0x1000,
//! Access to all layers texture wrap settings. Overwrites separate layer settings. //! Access to all layers texture wrap settings. Overwrites separate layer settings.
EMF_TEXTURE_WRAP, EMF_TEXTURE_WRAP = 0x2000,
//! AntiAliasing mode //! AntiAliasing mode
EMF_ANTI_ALIASING, EMF_ANTI_ALIASING = 0x4000,
//! ColorMask bits, for enabling the color planes //! ColorMask bits, for enabling the color planes
EMF_COLOR_MASK, EMF_COLOR_MASK = 0x8000
//! This is not a flag, but a value indicating how much flags there are.
EMF_MATERIAL_FLAG_COUNT
}; };
} // end namespace video } // end namespace video
......
...@@ -462,8 +462,6 @@ namespace video ...@@ -462,8 +462,6 @@ namespace video
return (AntiAliasing==1); return (AntiAliasing==1);
case EMF_COLOR_MASK: case EMF_COLOR_MASK:
return (ColorMask!=ECP_NONE); return (ColorMask!=ECP_NONE);
case EMF_MATERIAL_FLAG_COUNT:
break;
} }
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment