Reenable splitscreen
This commit is contained in:
parent
a8a97d28ce
commit
fef87b4853
@ -564,11 +564,11 @@ void FrameBuffer::Blit(const FrameBuffer &Src, FrameBuffer &Dst, GLbitfield mask
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
}
|
||||
|
||||
void FrameBuffer::BlitToDefault()
|
||||
void FrameBuffer::BlitToDefault(size_t x0, size_t y0, size_t x1, size_t y1)
|
||||
{
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
||||
glBlitFramebuffer(0, 0, width, height, x0, y0, x1, y1, GL_COLOR_BUFFER_BIT, GL_NEAREST);
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ public:
|
||||
size_t getWidth() const { return width; }
|
||||
size_t getHeight() const { return height; }
|
||||
static void Blit(const FrameBuffer &Src, FrameBuffer &Dst, GLbitfield mask = GL_COLOR_BUFFER_BIT, GLenum filter = GL_NEAREST);
|
||||
void BlitToDefault();
|
||||
void BlitToDefault(size_t, size_t, size_t, size_t);
|
||||
};
|
||||
|
||||
// core::rect<s32> needs these includes
|
||||
|
@ -183,6 +183,8 @@ void IrrDriver::renderGLSL(float dt)
|
||||
}
|
||||
}
|
||||
|
||||
const core::recti &viewport = camera->getViewport();
|
||||
|
||||
// Render the post-processed scene
|
||||
if (UserConfigParams::m_dynamic_lights)
|
||||
{
|
||||
@ -192,11 +194,11 @@ void IrrDriver::renderGLSL(float dt)
|
||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
|
||||
if (irr_driver->getNormals())
|
||||
irr_driver->getFBO(FBO_NORMAL_AND_DEPTHS);
|
||||
irr_driver->getFBO(FBO_NORMAL_AND_DEPTHS).BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
|
||||
else if (irr_driver->getSSAOViz())
|
||||
irr_driver->getFBO(FBO_SSAO).BlitToDefault();
|
||||
irr_driver->getFBO(FBO_SSAO).BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
|
||||
else
|
||||
fbo->BlitToDefault();
|
||||
fbo->BlitToDefault(viewport.UpperLeftCorner.X, viewport.UpperLeftCorner.Y, viewport.LowerRightCorner.X, viewport.LowerRightCorner.Y);
|
||||
|
||||
if (!UserConfigParams::m_mlaa)
|
||||
glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
|
Loading…
Reference in New Issue
Block a user