[client] corrected screen resize bug and incorrect scissor

This commit is contained in:
Geoffrey McRae 2017-12-13 02:28:41 +11:00
parent 893bb7e603
commit 5cfae05cae

View File

@ -492,6 +492,8 @@ bool lgr_opengl_render(void * opaque)
return false;
}
if (this->frameUpdate)
{
if (this->resizeWindow)
{
// setup the projection matrix
@ -525,7 +527,12 @@ bool lgr_opengl_render(void * opaque)
}
// update the scissor rect to prevent drawing outside of the frame
glScissor(0, 0, this->format.width, this->format.height);
glScissor(
this->destRect.x,
this->destRect.y,
this->destRect.w,
this->destRect.h
);
this->resizeWindow = false;
glDisable(GL_SCISSOR_TEST);
@ -533,8 +540,6 @@ bool lgr_opengl_render(void * opaque)
glEnable(GL_SCISSOR_TEST);
}
if (this->frameUpdate)
{
glXWaitVideoSyncSGI(1, 0, &this->gpuFrameCount);
glFinish();