mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
restorable: Bug fix: indices has to be copied
This commit is contained in:
parent
492149c463
commit
4feb0a4f3e
@ -413,10 +413,14 @@ func (i *Image) appendDrawTrianglesHistory(image *Image, vertices []float32, ind
|
||||
}
|
||||
// All images must be resolved and not stale each after frame.
|
||||
// So we don't have to care if image is stale or not here.
|
||||
|
||||
// vertices is generated at ebiten package and doesn't have to be copied so far.
|
||||
is := make([]uint16, len(indices))
|
||||
copy(is, indices)
|
||||
item := &drawTrianglesHistoryItem{
|
||||
image: image,
|
||||
vertices: vertices,
|
||||
indices: indices,
|
||||
indices: is,
|
||||
colorm: colorm,
|
||||
mode: mode,
|
||||
filter: filter,
|
||||
|
Loading…
Reference in New Issue
Block a user