mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/atlas: add assertions
This commit is contained in:
parent
116e131ccf
commit
bdae45be8f
@ -335,7 +335,11 @@ func (i *Image) putOnAtlas(graphicsDriver graphicsdriver.Graphics) error {
|
||||
panic("atlas: putOnAtlas cannot be called on a image that cannot be on an atlas")
|
||||
}
|
||||
|
||||
newI := NewImage(i.width, i.height, i.imageType)
|
||||
if i.imageType != ImageTypeRegular {
|
||||
panic(fmt.Sprintf("atlas: the image type must be ImageTypeRegular but %d", i.imageType))
|
||||
}
|
||||
|
||||
newI := NewImage(i.width, i.height, ImageTypeRegular)
|
||||
|
||||
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