mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-22 19:58:09 +00:00
[client] corrected screen resize bug and incorrect scissor
This commit is contained in:
parent
893bb7e603
commit
5cfae05cae
1 changed files with 46 additions and 41 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue