ebiten/graphics/texture_factory.go

37 lines
659 B
Go
Raw Normal View History

package graphics
import (
"image"
)
2014-05-02 17:06:20 +02:00
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 TextureCreatedEvent struct {
2013-12-08 08:19:24 +01:00
Tag interface{}
Id TextureId
Error error
}
type RenderTargetCreatedEvent struct {
2013-12-08 08:19:24 +01:00
Tag interface{}
2013-12-07 17:35:24 +01:00
Id RenderTargetId
Error error
}
type TextureFactory interface {
2014-01-11 10:07:12 +01:00
CreateRenderTarget(tag interface{}, width, height int, filter Filter)
2013-12-18 10:05:28 +01:00
CreateTexture(tag interface{}, img image.Image, filter Filter)
2013-12-16 01:39:49 +01:00
Events() <-chan interface{}
}