graphicsdriver/opengl: Fix suspicious GL function calls

Before this change, the pixel object buffer is unbound just after
getting a pointer by glMapBuffer. This seemed suspicious.

This change fixes to do all pixel manipulations once between
glMapBuffer and glUnmapBuffer without changing a bound buffer.

This might fix a wrong rendering on some machines, but I am not
sure.

Updates #993
This commit is contained in:
Hajime Hoshi
2019-11-20 02:41:31 +09:00
parent 8243c1838a
commit 52f6be2639
5 changed files with 50 additions and 29 deletions

View File

@@ -265,8 +265,6 @@ func (d *Driver) useProgram(mode driver.CompositeMode, colorM *affine.ColorM, fi
panic("source image is not set")
}
thePBOState.ensurePBOUnmapped()
if err := destination.setViewport(); err != nil {
return err
}