mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-03 22:44:28 +01:00
Refactoring
This commit is contained in:
parent
1dece94cc8
commit
05dede71e7
@ -48,17 +48,10 @@ func createNativeTexture(textureWidth, textureHeight int, pixels []uint8,
|
||||
return Native(nativeTexture)
|
||||
}
|
||||
|
||||
func create(textureWidth, textureHeight int, filter graphics.Filter) (
|
||||
interface{}, error) {
|
||||
return createNativeTexture(textureWidth, textureHeight, nil, filter), nil
|
||||
}
|
||||
|
||||
func Create(width, height int, filter graphics.Filter) (*gtexture.Texture, error) {
|
||||
native, err := create(graphics.AdjustSizeForTexture(width),
|
||||
graphics.AdjustSizeForTexture(height), filter)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
native := createNativeTexture(
|
||||
graphics.AdjustSizeForTexture(width),
|
||||
graphics.AdjustSizeForTexture(height), nil, filter)
|
||||
return gtexture.New(native, width, height), nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user