mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
Rename NewTexture -> NewImage
This commit is contained in:
parent
ee61db3478
commit
40c763724f
@ -66,7 +66,7 @@ func (d *debugPrintState) DebugPrint(r *ebiten.RenderTarget, str string) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
d.textTexture, err = ebiten.NewTexture(img, ebiten.FilterNearest)
|
d.textTexture, err = ebiten.NewImage(img, ebiten.FilterNearest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ func NewTextureFromFile(path string, filter ebiten.Filter) (*ebiten.Texture, ima
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
texture, err := ebiten.NewTexture(img, filter)
|
texture, err := ebiten.NewImage(img, filter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ func (t *Textures) loopMain() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
id, err := ebiten.NewTexture(img, ebiten.FilterNearest)
|
id, err := ebiten.NewImage(img, ebiten.FilterNearest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ func NewRenderTarget(width, height int, filter Filter) (*RenderTarget, error) {
|
|||||||
return currentUI.newRenderTarget(width, height, glFilter(filter))
|
return currentUI.newRenderTarget(width, height, glFilter(filter))
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewTexture returns a new Texture.
|
// NewImage returns a new image.
|
||||||
func NewTexture(img image.Image, filter Filter) (*Texture, error) {
|
func NewImage(img image.Image, filter Filter) (*Texture, error) {
|
||||||
return currentUI.newTexture(img, glFilter(filter))
|
return currentUI.newTexture(img, glFilter(filter))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user