diff --git a/internal/graphicsdriver/monogame/graphics.go b/internal/graphicsdriver/monogame/graphics.go index 3fb30fa9b..5d71363e1 100644 --- a/internal/graphicsdriver/monogame/graphics.go +++ b/internal/graphicsdriver/monogame/graphics.go @@ -80,7 +80,7 @@ func (g *Graphics) Reset() error { } func (g *Graphics) Draw(indexLen int, indexOffset int, mode driver.CompositeMode, colorM *affine.ColorM, filter driver.Filter, address driver.Address) error { - // TODO: Implement + g.game.Draw(indexLen, indexOffset, mode, colorM, filter, address) return nil } diff --git a/internal/monogame/monogame.go b/internal/monogame/monogame.go index 62d3c33cf..353d73f2d 100644 --- a/internal/monogame/monogame.go +++ b/internal/monogame/monogame.go @@ -22,6 +22,7 @@ import ( "syscall/js" "unsafe" + "github.com/hajimehoshi/ebiten/internal/affine" "github.com/hajimehoshi/ebiten/internal/driver" ) @@ -104,6 +105,11 @@ func (g *Game) SetVertices(vertices []float32, indices []uint16) { g.binding.Call("SetVertices", vs, is) } +func (g *Game) Draw(indexLen int, indexOffset int, mode driver.CompositeMode, colorM *affine.ColorM, filter driver.Filter, address driver.Address) { + // TODO: Implement this + g.binding.Call("Draw", indexLen, indexOffset) +} + type RenderTarget2D struct { v js.Value binding js.Value