2013-12-02 16:15:01 +01:00
|
|
|
package graphics
|
|
|
|
|
|
|
|
import (
|
|
|
|
"image"
|
|
|
|
)
|
|
|
|
|
2013-12-03 15:24:34 +01:00
|
|
|
type TextureCreatedEvent struct {
|
2013-12-08 08:19:24 +01:00
|
|
|
Tag interface{}
|
2013-12-03 15:24:34 +01:00
|
|
|
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
|
2013-12-03 15:24:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type TextureFactoryEvents interface {
|
|
|
|
TextureCreated() <-chan TextureCreatedEvent
|
|
|
|
RenderTargetCreated() <-chan RenderTargetCreatedEvent
|
|
|
|
}
|
|
|
|
|
2013-12-02 16:15:01 +01:00
|
|
|
type TextureFactory interface {
|
2013-12-08 08:19:24 +01:00
|
|
|
CreateRenderTarget(tag interface{}, width, height int)
|
|
|
|
CreateTexture(tag interface{}, img image.Image)
|
|
|
|
TextureFactoryEvents
|
2013-12-02 16:15:01 +01:00
|
|
|
}
|