graphicsdriver/opengl: Use GL_READ_WRITE at glMapBuffer

Updates #993
This commit is contained in:
Hajime Hoshi 2019-11-22 00:27:18 +09:00
parent 65fdf48cbf
commit 3df198f68e
2 changed files with 2 additions and 1 deletions

View File

@ -529,7 +529,7 @@ func (c *context) mapPixelBuffer(buffer buffer) unsafe.Pointer {
var ptr unsafe.Pointer
_ = c.t.Call(func() error {
gl.BindBuffer(gl.PIXEL_UNPACK_BUFFER, uint32(buffer))
ptr = gl.MapBuffer(gl.PIXEL_UNPACK_BUFFER, gl.WRITE_ONLY)
ptr = gl.MapBuffer(gl.PIXEL_UNPACK_BUFFER, gl.READ_WRITE)
return nil
})
return ptr

View File

@ -47,6 +47,7 @@ const (
MAX_TEXTURE_SIZE = 0x0D33
NEAREST = 0x2600
NO_ERROR = 0
READ_WRITE = 0x88BA
RGBA = 0x1908
TEXTURE_2D = 0x0DE1
TEXTURE_MAG_FILTER = 0x2800