mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-09-26 20:11:28 +08:00
internal/graphicsdriver/metal: fix the case when screenDrawable is nil
From the specification, screenDrawable can be nil when present is true.
This commit is contained in:
@@ -233,12 +233,6 @@ func (g *Graphics) flushIfNeeded(present bool) {
|
||||
if g.rce != (mtl.RenderCommandEncoder{}) {
|
||||
panic("metal: render command encoder must be empty if command buffer is empty")
|
||||
}
|
||||
if !present {
|
||||
return
|
||||
}
|
||||
if g.screenDrawable != (ca.MetalDrawable{}) {
|
||||
panic("metal: screen drawable must be empty if command buffer is empty")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user