Skip to content

Commit c09d026

Browse files
committedFeb 21, 2015
Fix particles draworder
1 parent 3998a1f commit c09d026

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/particles.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Particle::Particle(
7171
m_material.setFlag(video::EMF_BACK_FACE_CULLING, false);
7272
m_material.setFlag(video::EMF_BILINEAR_FILTER, false);
7373
m_material.setFlag(video::EMF_FOG_ENABLE, true);
74+
m_material.setFlag(video::EMF_ZWRITE_ENABLE, true);
7475
m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
7576
m_material.setTexture(0, texture);
7677
m_texpos = texpos;
@@ -119,8 +120,7 @@ void Particle::OnRegisterSceneNode()
119120

120121
void Particle::render()
121122
{
122-
// TODO: Render particles in front of water and the selectionbox
123-
123+
SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
124124
video::IVideoDriver* driver = SceneManager->getVideoDriver();
125125
driver->setMaterial(m_material);
126126
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);

1 commit comments

Comments
 (1)

kilbith commented on Feb 27, 2015

@kilbith
Contributor
Please sign in to comment.