mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
internal/graphicsdriver/metal: Refactoring
This commit is contained in:
parent
7f86761dde
commit
3ec02f767b
@ -379,6 +379,7 @@ func (g *Graphics) flushIfNeeded(present bool) {
|
||||
if g.cb == (mtl.CommandBuffer{}) {
|
||||
return
|
||||
}
|
||||
g.flushRenderCommandEncoderIfNeeded()
|
||||
|
||||
if present && g.screenDrawable != (ca.MetalDrawable{}) {
|
||||
g.cb.PresentDrawable(g.screenDrawable)
|
||||
@ -801,10 +802,6 @@ func (g *Graphics) DrawTriangles(dstID driver.ImageID, srcIDs [graphics.ShaderIm
|
||||
return err
|
||||
}
|
||||
|
||||
if dst.screen {
|
||||
g.flushRenderCommandEncoderIfNeeded()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user