Clean sp framebuffer individually

This commit is contained in:
Benau 2017-12-29 14:50:15 +08:00
parent 1e0b611c7d
commit 4ad7934a85
2 changed files with 7 additions and 4 deletions

View File

@ -275,13 +275,17 @@ void ShaderBasedRenderer::renderSceneDeferred(scene::ICameraSceneNode * const ca
{
m_rtts->getFBO(FBO_SP).bind();
glClearColor(1., 1., 1., 0.);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glClearColor(0., 0., 0., 0.);
float clear_color_white[4] = { 1.0f, 1.0f, 1.0f, 0.0f };
float clear_color_normal[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
glClearBufferfv(GL_COLOR, 0, clear_color_white);
glClearBufferfv(GL_COLOR, 1, clear_color_normal);
glClearBufferfv(GL_COLOR, 2, clear_color_white);
glClearBufferfi(GL_DEPTH_STENCIL, 0, 1.0f, 0);
ScopedGPUTimer Timer(irr_driver->getGPUTimer(Q_SOLID_PASS1));
SP::draw(SP::RP_1ST, SP::DCT_NORMAL);
}
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
// Lights
{
PROFILER_PUSH_CPU_MARKER("- Light", 0x00, 0xFF, 0x00);

View File

@ -29,7 +29,6 @@
#include "graphics/render_info.hpp"
#include "graphics/rtts.hpp"
#include "graphics/shaders.hpp"
#include "graphics/stk_tex_manager.hpp"
#include "graphics/sp/sp_dynamic_draw_call.hpp"
#include "graphics/sp/sp_instanced_data.hpp"
#include "graphics/sp/sp_per_object_uniform.hpp"