mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix scissor in FrameBufferList::renderBuffer for windowed mode.
Fixed top of the screen being cut.
This commit is contained in:
parent
59e86b7794
commit
58799e767f
|
@ -477,7 +477,8 @@ void FrameBufferList::renderBuffer(u32 _address)
|
||||||
|
|
||||||
PostProcessor::get().process(pBuffer);
|
PostProcessor::get().process(pBuffer);
|
||||||
// glDisable(GL_SCISSOR_TEST) does not affect glBlitFramebuffer, at least on AMD
|
// glDisable(GL_SCISSOR_TEST) does not affect glBlitFramebuffer, at least on AMD
|
||||||
glScissor(0, 0, ogl.getScreenWidth(), ogl.getScreenHeight());
|
GLint vOffset = ogl.isFullscreen() ? 0 : ogl.getHeightOffset();
|
||||||
|
glScissor(0, 0, ogl.getScreenWidth(), ogl.getScreenHeight() + vOffset);
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO);
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, pBuffer->m_FBO);
|
||||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
|
||||||
|
@ -486,9 +487,7 @@ void FrameBufferList::renderBuffer(u32 _address)
|
||||||
ogl.getRender().clearColorBuffer(clearColor);
|
ogl.getRender().clearColorBuffer(clearColor);
|
||||||
const float srcScaleY = ogl.getScaleY();
|
const float srcScaleY = ogl.getScaleY();
|
||||||
const GLint hOffset = (ogl.getScreenWidth() - ogl.getWidth()) / 2;
|
const GLint hOffset = (ogl.getScreenWidth() - ogl.getWidth()) / 2;
|
||||||
GLint vOffset = (ogl.getScreenHeight() - ogl.getHeight()) / 2;
|
vOffset += (ogl.getScreenHeight() - ogl.getHeight()) / 2;
|
||||||
if (!ogl.isFullscreen())
|
|
||||||
vOffset += ogl.getHeightOffset();
|
|
||||||
|
|
||||||
GLint srcCoord[4] = { 0, (GLint)(srcY0*srcScaleY), Xwidth, (GLint)(srcY1*srcScaleY) };
|
GLint srcCoord[4] = { 0, (GLint)(srcY0*srcScaleY), Xwidth, (GLint)(srcY1*srcScaleY) };
|
||||||
GLint dstCoord[4] = { X0 + hOffset, vOffset + (GLint)(dstY0*dstScaleY), hOffset + X1, vOffset + (GLint)(dstY1*dstScaleY) };
|
GLint dstCoord[4] = { X0 + hOffset, vOffset + (GLint)(dstY0*dstScaleY), hOffset + X1, vOffset + (GLint)(dstY1*dstScaleY) };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user