diff --git a/internal/graphicsdriver/opengl/context_desktop.go b/internal/graphicsdriver/opengl/context_desktop.go index 5928db8a9..7a57d7ecd 100644 --- a/internal/graphicsdriver/opengl/context_desktop.go +++ b/internal/graphicsdriver/opengl/context_desktop.go @@ -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 diff --git a/internal/graphicsdriver/opengl/gl/package.go b/internal/graphicsdriver/opengl/gl/package.go index a4ce01dc5..5fd5480ef 100644 --- a/internal/graphicsdriver/opengl/gl/package.go +++ b/internal/graphicsdriver/opengl/gl/package.go @@ -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