Skip to content

Commit

Permalink
graphicsdriver/opengl: Use GL_READ_WRITE at glMapBuffer
Browse files Browse the repository at this point in the history
Updates #993
  • Loading branch information
hajimehoshi committed Nov 21, 2019
1 parent 65fdf48 commit 3df198f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/graphicsdriver/opengl/context_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions internal/graphicsdriver/opengl/gl/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3df198f

Please sign in to comment.