mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-09-21 05:42:18 +02:00
29 lines
584 B
Go
29 lines
584 B
Go
package graphics
|
|
|
|
import (
|
|
"image"
|
|
)
|
|
|
|
type TextureCreatedEvent struct {
|
|
Tag string
|
|
Id TextureId
|
|
Error error
|
|
}
|
|
|
|
type RenderTargetCreatedEvent struct {
|
|
Tag string
|
|
RenderTargetId RenderTargetId
|
|
Error error
|
|
}
|
|
|
|
type TextureFactoryEvents interface {
|
|
TextureCreated() <-chan TextureCreatedEvent
|
|
RenderTargetCreated() <-chan RenderTargetCreatedEvent
|
|
}
|
|
|
|
type TextureFactory interface {
|
|
CreateRenderTarget(tag string, width, height int) (RenderTargetId, error)
|
|
CreateTextureFromImage(tag string, img image.Image) (TextureId, error)
|
|
//TextureFactoryEvents
|
|
}
|