Skip to content

Commit

Permalink
UPBGE: Clear depth for Image[Render/Mirror].
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Aug 28, 2016
1 parent 84fb0ee commit c032791
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/gameengine/VideoTexture/ImageRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,13 @@ bool ImageRender::Render()
// bind the fbo and set the viewport to full size
GPU_offscreen_bind_simple(m_offScreen);

m_rasterizer->BeginFrame(m_engine->GetClockTime());

m_rasterizer->SetViewport(m_position[0], m_position[1], m_position[0] + m_capSize[0], m_position[1] + m_capSize[1]);
m_rasterizer->SetScissor(m_position[0], m_position[1], m_position[0] + m_capSize[0], m_position[1] + m_capSize[1]);

m_rasterizer->BeginFrame(m_engine->GetClockTime());
m_rasterizer->Clear(RAS_IRasterizer::RAS_DEPTH_BUFFER_BIT);

m_scene->GetWorldInfo()->UpdateWorldSettings(m_rasterizer);
m_rasterizer->SetAuxilaryClientInfo(m_scene);
m_rasterizer->DisplayFog();
Expand Down

0 comments on commit c032791

Please sign in to comment.