monogame: Implement Draw temporarily

Updates #1078
This commit is contained in:
Hajime Hoshi 2020-04-06 00:13:04 +09:00
parent 44088cf14e
commit 7dd9150b86
2 changed files with 7 additions and 1 deletions

View File

@ -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
}

View File

@ -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