Fixed rendering issue when switching advanced pipeline on to off in RTT screen
This commit is contained in:
parent
2da28b22b7
commit
0630145a5c
@ -269,6 +269,7 @@ RTT::RTT(size_t width, size_t height)
|
||||
|
||||
RTT::~RTT()
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glDeleteTextures(RTT_COUNT, RenderTargetTextures);
|
||||
glDeleteTextures(1, &DepthStencilTexture);
|
||||
if (CVS->isShadowEnabled())
|
||||
|
@ -55,8 +55,13 @@ void ShaderBasedRenderer::setRTTDimensions(size_t width, size_t height)
|
||||
m_rtts = new RTT(width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
//same dimensions; we don't need to create a new RTT
|
||||
//just clear FBO_COMBINED_DIFFUSE_SPECULAR
|
||||
m_rtts->getFBO(FBO_COMBINED_DIFFUSE_SPECULAR).bind();
|
||||
glClearColor(.5, .5, .5, .5);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user