|
|
@@ -1483,7 +1483,13 @@ void View::ExecuteRenderPathCommands()
|
|
|
{
|
|
|
currentRenderTarget_ = viewportTextures_[1]->GetRenderSurface();
|
|
|
// If the render path ends into a quad, it can be redirected to the final render target
|
|
|
+ // However, on OpenGL we can not reliably do this in case the final target is the backbuffer, and we want to
|
|
|
+ // render depth buffer sensitive debug geometry afterward (backbuffer and textures can not share depth)
|
|
|
+ #ifndef URHO3D_OPENGL
|
|
|
if (i == lastCommandIndex && command.type_ == CMD_QUAD)
|
|
|
+ #else
|
|
|
+ if (i == lastCommandIndex && command.type_ == CMD_QUAD && renderTarget_)
|
|
|
+ #endif
|
|
|
currentRenderTarget_ = renderTarget_;
|
|
|
}
|
|
|
else
|