mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
buffered: Fix delayed DrawImage() (#1050)
This commit is contained in:
parent
ad00414a2a
commit
27404b7ae3
@ -222,6 +222,8 @@ func (i *Image) DrawImage(src *Image, bounds image.Rectangle, a, b, c, d, tx, ty
|
||||
delayedCommandsM.Lock()
|
||||
if needsToDelayCommands {
|
||||
delayedCommands = append(delayedCommands, func() {
|
||||
src.resolvePendingPixels(true)
|
||||
i.resolvePendingPixels(false)
|
||||
i.img.DrawImage(src.img, bounds, g, colorm, mode, filter)
|
||||
})
|
||||
delayedCommandsM.Unlock()
|
||||
@ -242,6 +244,8 @@ func (i *Image) DrawTriangles(src *Image, vertices []float32, indices []uint16,
|
||||
delayedCommandsM.Lock()
|
||||
if needsToDelayCommands {
|
||||
delayedCommands = append(delayedCommands, func() {
|
||||
src.resolvePendingPixels(true)
|
||||
i.resolvePendingPixels(false)
|
||||
i.img.DrawTriangles(src.img, vertices, indices, colorm, mode, filter, address)
|
||||
})
|
||||
delayedCommandsM.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user