Fix "tearing" issue

This commit is contained in:
Simon 2020-04-02 22:49:50 +01:00
parent 7ec233af45
commit d6d6085740

View file

@ -469,8 +469,14 @@ unsigned char *FGLRenderer::GetTextureBuffer(FTexture *tex, int &w, int &h)
#ifdef USE_GL_HW_BUFFERS
void FGLRenderer::GPUDropSync()
{
if(nbrHwBuffers > 1)
syncBuff[VtxBuff] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE,0);
if(nbrHwBuffers > 1) {
if (syncBuff[VtxBuff] != NULL)
{
glDeleteSync(syncBuff[VtxBuff]);
}
syncBuff[VtxBuff] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
}
}
void FGLRenderer::GPUWaitSync()