Fixed resolution changing bug with MSAA and HDR.

After a resolution change the hdrNonMSAAFBO needed to be reattached
after Resize, not doing that resulted in a black screen (being attached
to the old deleted texture).
This commit is contained in:
Codes4Fun 2016-10-24 16:07:17 -07:00
parent d53b9cafda
commit 2ce3f660bd

View file

@ -221,13 +221,17 @@ void Framebuffer::CheckFramebuffers()
{
globalImages->currentRenderHDRImageNoMSAA->Resize( screenWidth, screenHeight );
globalFramebuffers.hdrNonMSAAFBO->Bind();
globalFramebuffers.hdrNonMSAAFBO->AttachImage2D( GL_TEXTURE_2D, globalImages->currentRenderHDRImageNoMSAA, 0 );
globalFramebuffers.hdrNonMSAAFBO->Check();
globalFramebuffers.hdrNonMSAAFBO->width = screenWidth;
globalFramebuffers.hdrNonMSAAFBO->height = screenHeight;
globalFramebuffers.hdrFBO->Bind();
globalFramebuffers.hdrFBO->AttachImage2D( GL_TEXTURE_2D_MULTISAMPLE, globalImages->currentRenderHDRImage, 0 );
globalFramebuffers.hdrFBO->AttachImageDepth( GL_TEXTURE_2D_MULTISAMPLE, globalImages->currentDepthImage );
globalFramebuffers.hdrFBO->Check();
globalFramebuffers.hdrNonMSAAFBO->width = screenWidth;
globalFramebuffers.hdrNonMSAAFBO->height = screenHeight;
}
else
#endif