mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/atlas: add an assertion at putOnAtlas
This commit is contained in:
parent
9bf5f2188f
commit
7f10744514
@ -323,9 +323,11 @@ func (i *Image) putOnAtlas(graphicsDriver graphicsdriver.Graphics) error {
|
||||
if !i.canBePutOnAtlas() {
|
||||
panic("atlas: putOnAtlas cannot be called on a image that cannot be on an atlas")
|
||||
}
|
||||
if i.volatile {
|
||||
panic("atlas: a volatile image cannot be put on an atlas")
|
||||
}
|
||||
|
||||
newI := NewImage(i.width, i.height)
|
||||
newI.SetVolatile(i.volatile)
|
||||
|
||||
if restorable.NeedsRestoring() {
|
||||
// If the underlying graphics driver requires restoring from the context lost, the pixel data is
|
||||
|
Loading…
Reference in New Issue
Block a user