ebiten/graphics/texture_factory.go
2014-05-03 17:50:42 +09:00

24 lines
457 B
Go

package graphics
import (
"image"
)
type Filter int
const (
FilterNearest Filter = iota
FilterLinear
)
type TextureId int
// A render target is essentially same as a texture, but it is assumed that the
// all alpha of a render target is maximum.
type RenderTargetId int
type TextureFactory interface {
CreateRenderTarget(width, height int, filter Filter) (RenderTargetId, error)
CreateTexture(img image.Image, filter Filter) (TextureId, error)
}