Commit 529b6f0f authored by hybrid's avatar hybrid

Merged revisions 1543:1559 from 1.4 branch. Mainly zbuffer issues and the...

Merged revisions 1543:1559 from 1.4 branch. Mainly zbuffer issues and the TextureMatrix allocator patch.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1560 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 05c55f71
...@@ -960,15 +960,20 @@ namespace video ...@@ -960,15 +960,20 @@ namespace video
it. */ it. */
virtual void enableClipPlane(u32 index, bool enable) = 0; virtual void enableClipPlane(u32 index, bool enable) = 0;
//! Sets the driver's ambient light color. Only used by the engine internally. //! Returns the graphics card vendor name.
/** This color is set in the scene manager, see virtual core::stringc getVendorInfo() = 0;
//! Only used by the engine internally.
/** The ambient color is set in the scene manager, see
scene::ISceneManager::setAmbientLight(). scene::ISceneManager::setAmbientLight().
\param color New color of the ambient light. */ \param color New color of the ambient light. */
virtual void setAmbientLight(const SColorf& color) = 0; virtual void setAmbientLight(const SColorf& color) = 0;
//! Returns the graphics card vendor name. //! Only used by the engine internally.
virtual core::stringc getVendorInfo() = 0; /** Passes the global material flag DisableZWriteOnTransparent.
Use the SceneManager attribute to set this value from the app.
\param color New color of the ambient light. */
virtual void setDisableZWriteOnTransparent(bool flag=true) = 0;
}; };
} // end namespace video } // end namespace video
......
...@@ -410,6 +410,14 @@ namespace video ...@@ -410,6 +410,14 @@ namespace video
\return True if the materials are equal, else false. */ \return True if the materials are equal, else false. */
inline bool operator==(const SMaterial& b) const inline bool operator==(const SMaterial& b) const
{ return !(b!=*this); } { return !(b!=*this); }
bool isTransparent() const
{
return MaterialType==EMT_TRANSPARENT_ADD_COLOR ||
MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL ||
MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA ||
MaterialType==EMT_TRANSPARENT_REFLECTION_2_LAYER;
}
}; };
} // end namespace video } // end namespace video
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define __S_MATERIAL_LAYER_H_INCLUDED__ #define __S_MATERIAL_LAYER_H_INCLUDED__
#include "matrix4.h" #include "matrix4.h"
#include "irrAllocator.h"
namespace irr namespace irr
{ {
...@@ -40,11 +41,11 @@ namespace video ...@@ -40,11 +41,11 @@ namespace video
public: public:
//! Default constructor //! Default constructor
SMaterialLayer() SMaterialLayer()
: Texture(0), TextureMatrix(0), : Texture(0),
TextureWrap(ETC_REPEAT), TextureWrap(ETC_REPEAT),
BilinearFilter(true), BilinearFilter(true),
TrilinearFilter(false), TrilinearFilter(false),
AnisotropicFilter(false) AnisotropicFilter(false), TextureMatrix(0)
{} {}
//! Copy constructor //! Copy constructor
...@@ -59,7 +60,8 @@ namespace video ...@@ -59,7 +60,8 @@ namespace video
//! Destructor //! Destructor
~SMaterialLayer() ~SMaterialLayer()
{ {
delete TextureMatrix; MatrixAllocator.destruct(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
} }
//! Assignment operator //! Assignment operator
...@@ -74,14 +76,18 @@ namespace video ...@@ -74,14 +76,18 @@ namespace video
*TextureMatrix = *other.TextureMatrix; *TextureMatrix = *other.TextureMatrix;
else else
{ {
delete TextureMatrix; MatrixAllocator.destruct(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
TextureMatrix = 0; TextureMatrix = 0;
} }
} }
else else
{ {
if (other.TextureMatrix) if (other.TextureMatrix)
TextureMatrix = new core::matrix4(*other.TextureMatrix); {
TextureMatrix = MatrixAllocator.allocate(1);
MatrixAllocator.construct(TextureMatrix,*other.TextureMatrix);
}
else else
TextureMatrix = 0; TextureMatrix = 0;
} }
...@@ -96,11 +102,6 @@ namespace video ...@@ -96,11 +102,6 @@ namespace video
//! Texture //! Texture
ITexture* Texture; ITexture* Texture;
//! Texture Matrix
/** Do not access this element directly as the internal
resource management has to cope with Null pointers etc. */
core::matrix4* TextureMatrix;
//! Texture Clamp Mode //! Texture Clamp Mode
E_TEXTURE_CLAMP TextureWrap; E_TEXTURE_CLAMP TextureWrap;
...@@ -124,7 +125,10 @@ namespace video ...@@ -124,7 +125,10 @@ namespace video
core::matrix4& getTextureMatrix() core::matrix4& getTextureMatrix()
{ {
if (!TextureMatrix) if (!TextureMatrix)
TextureMatrix = new core::matrix4(core::matrix4::EM4CONST_IDENTITY); {
TextureMatrix = MatrixAllocator.allocate(1);
MatrixAllocator.construct(TextureMatrix,core::IdentityMatrix);
}
return *TextureMatrix; return *TextureMatrix;
} }
...@@ -143,7 +147,10 @@ namespace video ...@@ -143,7 +147,10 @@ namespace video
void setTextureMatrix(const core::matrix4& mat) void setTextureMatrix(const core::matrix4& mat)
{ {
if (!TextureMatrix) if (!TextureMatrix)
TextureMatrix = new core::matrix4(mat); {
TextureMatrix = MatrixAllocator.allocate(1);
MatrixAllocator.construct(TextureMatrix,mat);
}
else else
*TextureMatrix = mat; *TextureMatrix = mat;
} }
...@@ -173,10 +180,18 @@ namespace video ...@@ -173,10 +180,18 @@ namespace video
\return True if layers are equal, else false. */ \return True if layers are equal, else false. */
inline bool operator==(const SMaterialLayer& b) const inline bool operator==(const SMaterialLayer& b) const
{ return !(b!=*this); } { return !(b!=*this); }
private:
friend class SMaterial;
irr::core::irrAllocator<irr::core::matrix4> MatrixAllocator;
//! Texture Matrix
/** Do not access this element directly as the internal
ressource management has to cope with Null pointers etc. */
core::matrix4* TextureMatrix;
}; };
} // end namespace video } // end namespace video
} // end namespace irr } // end namespace irr
#endif // __S_MATERIAL_LAYER_H_INCLUDED__ #endif // __S_MATERIAL_LAYER_H_INCLUDED__
...@@ -16,6 +16,19 @@ namespace irr ...@@ -16,6 +16,19 @@ namespace irr
{ {
namespace scene namespace scene
{ {
//! Name of the parameter for changing how Irrlicht handles the ZWrite flag for transparent (blending) materials
/** The default behavior in Irrlicht is to disable writing to the
z-buffer for all really transparent, i.e. blending materials. This
avoids problems with intersecting faces, but can also break renderings.
If transparent materials should use the SMaterial flag for ZWriteEnable
jsut as other material types use this attribute.
Use it like this:
\code
SceneManager->getParameters()->setAttribute(scene::DISABLE_ZWRITE_ON_TRANPARENT, false);
\endcode
**/
const c8* const DISABLE_ZWRITE_ON_TRANSPARENT = "Disable_ZWrite_On_Transparent";
//! Name of the parameter for changing the texture path of the built-in csm loader. //! Name of the parameter for changing the texture path of the built-in csm loader.
/** Use it like this: /** Use it like this:
\code \code
......
...@@ -1339,9 +1339,9 @@ void CD3D8Driver::setBasicRenderStates(const SMaterial& material, const SMateria ...@@ -1339,9 +1339,9 @@ void CD3D8Driver::setBasicRenderStates(const SMaterial& material, const SMateria
// zwrite // zwrite
if (resetAllRenderstates || lastmaterial.ZWriteEnable != material.ZWriteEnable) // if (resetAllRenderstates || lastmaterial.ZWriteEnable != material.ZWriteEnable)
{ {
if (material.ZWriteEnable) if (material.ZWriteEnable && !(DisableZWriteOnTransparent && material.isTransparent()))
pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE); pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE);
else else
pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE); pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE);
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
E_MODULATE_FUNC modulate; E_MODULATE_FUNC modulate;
unpack_texureBlendFunc ( srcFact, dstFact, modulate, material.MaterialTypeParam ); unpack_texureBlendFunc ( srcFact, dstFact, modulate, material.MaterialTypeParam );
if (srcFact == EBF_SRC_COLOR && dstFact == EBF_ZERO) if (srcFact == EBF_SRC_COLOR && dstFact == EBF_ZERO)
pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
else else
{ {
...@@ -219,8 +219,6 @@ public: ...@@ -219,8 +219,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
...@@ -257,8 +255,6 @@ public: ...@@ -257,8 +255,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
...@@ -302,8 +298,6 @@ public: ...@@ -302,8 +298,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
...@@ -339,8 +333,8 @@ public: ...@@ -339,8 +333,8 @@ public:
pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); pID3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
pID3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE ); pID3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE );
pID3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); pID3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE );
pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
...@@ -349,8 +343,6 @@ public: ...@@ -349,8 +343,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
......
...@@ -1676,9 +1676,9 @@ void CD3D9Driver::setBasicRenderStates(const SMaterial& material, const SMateria ...@@ -1676,9 +1676,9 @@ void CD3D9Driver::setBasicRenderStates(const SMaterial& material, const SMateria
} }
// zwrite // zwrite
if (resetAllRenderstates || lastmaterial.ZWriteEnable != material.ZWriteEnable) // if (resetAllRenderstates || (lastmaterial.ZWriteEnable != material.ZWriteEnable))
{ {
if ( material.ZWriteEnable ) if ( material.ZWriteEnable && !(DisableZWriteOnTransparent && material.isTransparent))
pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE); pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, TRUE);
else else
pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE); pID3DDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE);
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
E_MODULATE_FUNC modulate; E_MODULATE_FUNC modulate;
unpack_texureBlendFunc ( srcFact, dstFact, modulate, material.MaterialTypeParam ); unpack_texureBlendFunc ( srcFact, dstFact, modulate, material.MaterialTypeParam );
if (srcFact == EBF_SRC_COLOR && dstFact == EBF_ZERO) if (srcFact == EBF_SRC_COLOR && dstFact == EBF_ZERO)
{ {
pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
} }
...@@ -240,8 +240,6 @@ public: ...@@ -240,8 +240,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
...@@ -281,8 +279,6 @@ public: ...@@ -281,8 +279,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
...@@ -327,8 +323,6 @@ public: ...@@ -327,8 +323,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
...@@ -376,8 +370,6 @@ public: ...@@ -376,8 +370,6 @@ public:
pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); pID3DDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
} }
((SMaterial&)material).ZWriteEnable = false;
services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); services->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
} }
......
...@@ -70,7 +70,7 @@ IImageWriter* createImageWriterPPM(); ...@@ -70,7 +70,7 @@ IImageWriter* createImageWriterPPM();
//! constructor //! constructor
CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<s32>& screenSize) CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<s32>& screenSize)
: FileSystem(io), MeshManipulator(0), ViewPort(0,0,0,0), ScreenSize(screenSize), : FileSystem(io), MeshManipulator(0), ViewPort(0,0,0,0), ScreenSize(screenSize),
PrimitivesDrawn(0), TextureCreationFlags(0) PrimitivesDrawn(0), TextureCreationFlags(0), DisableZWriteOnTransparent(true)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CNullDriver"); setDebugName("CNullDriver");
......
...@@ -496,6 +496,10 @@ namespace video ...@@ -496,6 +496,10 @@ namespace video
//! Returns the graphics card vendor name. //! Returns the graphics card vendor name.
virtual core::stringc getVendorInfo() {return "Not available on this driver.";}; virtual core::stringc getVendorInfo() {return "Not available on this driver.";};
//! Only used by the engine internally.
virtual void setDisableZWriteOnTransparent(bool flag=true)
{ DisableZWriteOnTransparent=flag; }
protected: protected:
//! deletes all textures //! deletes all textures
...@@ -600,13 +604,15 @@ namespace video ...@@ -600,13 +604,15 @@ namespace video
u32 TextureCreationFlags; u32 TextureCreationFlags;
bool LinearFog;
f32 FogStart; f32 FogStart;
f32 FogEnd; f32 FogEnd;
f32 FogDensity; f32 FogDensity;
SColor FogColor;
bool LinearFog;
bool PixelFog; bool PixelFog;
bool RangeFog; bool RangeFog;
SColor FogColor;
bool DisableZWriteOnTransparent;
SExposedVideoData ExposedData; SExposedVideoData ExposedData;
}; };
......
...@@ -390,7 +390,7 @@ void COpenGLDriver::createMaterialRenderers() ...@@ -390,7 +390,7 @@ void COpenGLDriver::createMaterialRenderers()
addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SOLID_2_LAYER(this)); addAndDropMaterialRenderer(new COpenGLMaterialRenderer_SOLID_2_LAYER(this));
// add the same renderer for all lightmap types // add the same renderer for all lightmap types
COpenGLMaterialRenderer_LIGHTMAP* lmr = new COpenGLMaterialRenderer_LIGHTMAP( this); COpenGLMaterialRenderer_LIGHTMAP* lmr = new COpenGLMaterialRenderer_LIGHTMAP(this);
addMaterialRenderer(lmr); // for EMT_LIGHTMAP: addMaterialRenderer(lmr); // for EMT_LIGHTMAP:
addMaterialRenderer(lmr); // for EMT_LIGHTMAP_ADD: addMaterialRenderer(lmr); // for EMT_LIGHTMAP_ADD:
addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M2: addMaterialRenderer(lmr); // for EMT_LIGHTMAP_M2:
...@@ -457,7 +457,6 @@ bool COpenGLDriver::endScene(void* windowId, core::rect<s32>* sourceRect) ...@@ -457,7 +457,6 @@ bool COpenGLDriver::endScene(void* windowId, core::rect<s32>* sourceRect)
} }
//! clears the zbuffer //! clears the zbuffer
bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color) bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color)
{ {
...@@ -477,6 +476,7 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color) ...@@ -477,6 +476,7 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color)
if (zBuffer) if (zBuffer)
{ {
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
LastMaterial.ZWriteEnable=true;
mask |= GL_DEPTH_BUFFER_BIT; mask |= GL_DEPTH_BUFFER_BIT;
} }
...@@ -485,7 +485,6 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color) ...@@ -485,7 +485,6 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color)
} }
//! Returns the transformation set by setTransform //! Returns the transformation set by setTransform
const core::matrix4& COpenGLDriver::getTransform(E_TRANSFORMATION_STATE state) const const core::matrix4& COpenGLDriver::getTransform(E_TRANSFORMATION_STATE state) const
{ {
...@@ -493,7 +492,6 @@ const core::matrix4& COpenGLDriver::getTransform(E_TRANSFORMATION_STATE state) c ...@@ -493,7 +492,6 @@ const core::matrix4& COpenGLDriver::getTransform(E_TRANSFORMATION_STATE state) c
} }
//! sets transformation //! sets transformation
void COpenGLDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat) void COpenGLDriver::setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat)
{ {
...@@ -1652,7 +1650,7 @@ void COpenGLDriver::setRenderStates3DMode() ...@@ -1652,7 +1650,7 @@ void COpenGLDriver::setRenderStates3DMode()
// unset old material // unset old material
if (LastMaterial.MaterialType != Material.MaterialType && if (LastMaterial.MaterialType != Material.MaterialType &&
static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size()) static_cast<u32>(LastMaterial.MaterialType) < MaterialRenderers.size())
MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial(); MaterialRenderers[LastMaterial.MaterialType].Renderer->OnUnsetMaterial();
// set new material. // set new material.
...@@ -1875,9 +1873,9 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater ...@@ -1875,9 +1873,9 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
} }
// zwrite // zwrite
if (resetAllRenderStates || lastmaterial.ZWriteEnable != material.ZWriteEnable) // if (resetAllRenderStates || lastmaterial.ZWriteEnable != material.ZWriteEnable)
{ {
if (material.ZWriteEnable) if (material.ZWriteEnable && !(DisableZWriteOnTransparent && material.isTransparent()))
{ {
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
} }
...@@ -2636,6 +2634,7 @@ bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuff ...@@ -2636,6 +2634,7 @@ bool COpenGLDriver::setRenderTarget(video::ITexture* texture, bool clearBackBuff
if (clearZBuffer) if (clearZBuffer)
{ {
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
LastMaterial.ZWriteEnable=true;
mask |= GL_DEPTH_BUFFER_BIT; mask |= GL_DEPTH_BUFFER_BIT;
} }
......
...@@ -305,7 +305,6 @@ public: ...@@ -305,7 +305,6 @@ public:
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND); glEnable(GL_BLEND);
} }
glDepthMask(GL_FALSE);
} }
virtual void OnUnsetMaterial() virtual void OnUnsetMaterial()
......
...@@ -1256,6 +1256,8 @@ void CSceneManager::drawAll() ...@@ -1256,6 +1256,8 @@ void CSceneManager::drawAll()
driver->setTransform ( video::ETS_TEXTURE_3, core::IdentityMatrix ); driver->setTransform ( video::ETS_TEXTURE_3, core::IdentityMatrix );
} }
driver->setDisableZWriteOnTransparent(Parameters.getAttributeAsBool( DISABLE_ZWRITE_ON_TRANSPARENT) );
// do animations and other stuff. // do animations and other stuff.
OnAnimate(os::Timer::getTime()); OnAnimate(os::Timer::getTime());
......
...@@ -439,6 +439,10 @@ ...@@ -439,6 +439,10 @@
RelativePath="..\..\include\SMaterial.h" RelativePath="..\..\include\SMaterial.h"
> >
</File> </File>
<File
RelativePath="..\..\include\SMaterialLayer.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="core" Name="core"
......
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