mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
restorable: Bug fix: commands must be flushed at At
This commit is contained in:
parent
8149ace52c
commit
99f72a1b64
@ -198,6 +198,9 @@ func (i *Image) At(x, y int) (color.RGBA, error) {
|
||||
if x < 0 || y < 0 || w <= x || h <= y {
|
||||
return color.RGBA{}, nil
|
||||
}
|
||||
if err := graphics.FlushCommands(); err != nil {
|
||||
return color.RGBA{}, err
|
||||
}
|
||||
if i.basePixels == nil || i.drawImageHistory != nil || i.stale {
|
||||
if err := i.readPixelsFromGPU(); err != nil {
|
||||
return color.RGBA{}, err
|
||||
|
Loading…
Reference in New Issue
Block a user