mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/restorable: bug fix: an extended image has a wrong state (especially with OpenGL ES)
This commit is contained in:
parent
a5a5de2f3f
commit
42aa5fa604
@ -204,14 +204,6 @@ func (i *Image) Extend(width, height int) *Image {
|
||||
Height: float32(sh),
|
||||
}
|
||||
newImg.DrawTriangles(srcs, offsets, vs, is, graphicsdriver.BlendCopy, dr, graphicsdriver.Region{}, NearestFilterShader, nil, false)
|
||||
|
||||
// Overwrite the history as if the image newImg is created only by WritePixels.
|
||||
newImg.clearDrawTrianglesHistory()
|
||||
newImg.basePixels = i.basePixels
|
||||
newImg.stale = i.stale
|
||||
newImg.staleRegions = make([]image.Rectangle, len(i.staleRegions))
|
||||
copy(newImg.staleRegions, i.staleRegions)
|
||||
|
||||
i.Dispose()
|
||||
|
||||
return newImg
|
||||
|
Loading…
Reference in New Issue
Block a user