mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 19:58:54 +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()
|
delayedCommandsM.Lock()
|
||||||
if needsToDelayCommands {
|
if needsToDelayCommands {
|
||||||
delayedCommands = append(delayedCommands, func() {
|
delayedCommands = append(delayedCommands, func() {
|
||||||
|
src.resolvePendingPixels(true)
|
||||||
|
i.resolvePendingPixels(false)
|
||||||
i.img.DrawImage(src.img, bounds, g, colorm, mode, filter)
|
i.img.DrawImage(src.img, bounds, g, colorm, mode, filter)
|
||||||
})
|
})
|
||||||
delayedCommandsM.Unlock()
|
delayedCommandsM.Unlock()
|
||||||
@ -242,6 +244,8 @@ func (i *Image) DrawTriangles(src *Image, vertices []float32, indices []uint16,
|
|||||||
delayedCommandsM.Lock()
|
delayedCommandsM.Lock()
|
||||||
if needsToDelayCommands {
|
if needsToDelayCommands {
|
||||||
delayedCommands = append(delayedCommands, func() {
|
delayedCommands = append(delayedCommands, func() {
|
||||||
|
src.resolvePendingPixels(true)
|
||||||
|
i.resolvePendingPixels(false)
|
||||||
i.img.DrawTriangles(src.img, vertices, indices, colorm, mode, filter, address)
|
i.img.DrawTriangles(src.img, vertices, indices, colorm, mode, filter, address)
|
||||||
})
|
})
|
||||||
delayedCommandsM.Unlock()
|
delayedCommandsM.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user