ebiten/graphics/context.go

26 lines
479 B
Go
Raw Normal View History

2013-12-02 13:45:10 +01:00
package graphics
import (
"github.com/hajimehoshi/go-ebiten/graphics/matrix"
)
2014-05-01 15:45:48 +02:00
type Drawer interface {
Draw(geometryMatrix matrix.Geometry,
2013-12-02 13:45:10 +01:00
colorMatrix matrix.Color)
2014-05-01 15:45:48 +02:00
DrawParts(parts []TexturePart,
2013-12-02 13:45:10 +01:00
geometryMatrix matrix.Geometry,
colorMatrix matrix.Color)
2014-05-01 15:45:48 +02:00
}
type Context interface {
Clear()
Fill(r, g, b uint8)
Texture(id TextureId) Drawer
RenderTarget(id RenderTargetId) Drawer
2013-12-02 13:45:10 +01:00
ResetOffscreen()
SetOffscreen(id RenderTargetId)
// TODO: glTextureSubImage2D
2013-12-02 13:45:10 +01:00
}