mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-23 16:08:51 -05:00
Fix particles draworder
This commit is contained in:
parent
3998a1f8f9
commit
c09d026f05
@ -71,6 +71,7 @@ Particle::Particle(
|
|||||||
m_material.setFlag(video::EMF_BACK_FACE_CULLING, false);
|
m_material.setFlag(video::EMF_BACK_FACE_CULLING, false);
|
||||||
m_material.setFlag(video::EMF_BILINEAR_FILTER, false);
|
m_material.setFlag(video::EMF_BILINEAR_FILTER, false);
|
||||||
m_material.setFlag(video::EMF_FOG_ENABLE, true);
|
m_material.setFlag(video::EMF_FOG_ENABLE, true);
|
||||||
|
m_material.setFlag(video::EMF_ZWRITE_ENABLE, true);
|
||||||
m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||||
m_material.setTexture(0, texture);
|
m_material.setTexture(0, texture);
|
||||||
m_texpos = texpos;
|
m_texpos = texpos;
|
||||||
@ -119,8 +120,7 @@ void Particle::OnRegisterSceneNode()
|
|||||||
|
|
||||||
void Particle::render()
|
void Particle::render()
|
||||||
{
|
{
|
||||||
// TODO: Render particles in front of water and the selectionbox
|
SceneManager->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
|
||||||
|
|
||||||
video::IVideoDriver* driver = SceneManager->getVideoDriver();
|
video::IVideoDriver* driver = SceneManager->getVideoDriver();
|
||||||
driver->setMaterial(m_material);
|
driver->setMaterial(m_material);
|
||||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||||
|
Loading…
Reference in New Issue
Block a user