mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-09-07 15:51:27 +00:00
[client] corrected screen resize bug and incorrect scissor
This commit is contained in:
@@ -492,6 +492,8 @@ bool lgr_opengl_render(void * opaque)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->frameUpdate)
|
||||||
|
{
|
||||||
if (this->resizeWindow)
|
if (this->resizeWindow)
|
||||||
{
|
{
|
||||||
// setup the projection matrix
|
// 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
|
// 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;
|
this->resizeWindow = false;
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
@@ -533,8 +540,6 @@ bool lgr_opengl_render(void * opaque)
|
|||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->frameUpdate)
|
|
||||||
{
|
|
||||||
glXWaitVideoSyncSGI(1, 0, &this->gpuFrameCount);
|
glXWaitVideoSyncSGI(1, 0, &this->gpuFrameCount);
|
||||||
glFinish();
|
glFinish();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user