From 13393ef04bc364534cd0a1b134eecddcff5dc67c Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sat, 7 Feb 2015 01:55:14 +0100 Subject: [PATCH] Fix 1808 --- src/graphics/render.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 13fe63705d1..40e3986b96f 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -378,6 +378,13 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, unsigned po glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); renderSolidFirstPass(); } + else + { + // We need a cleared depth buffer for some effect (eg particles depth blending) + m_rtts->getFBO(FBO_NORMAL_AND_DEPTHS).Bind(); + glClear(GL_DEPTH_BUFFER_BIT); + glBindFramebuffer(GL_FRAMEBUFFER, 0); + } PROFILER_POP_CPU_MARKER();