mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphics: Remove Texture.Size
This commit is contained in:
parent
0374bf0538
commit
efd019c00e
@ -56,11 +56,10 @@ func NewFramebufferFromTexture(c *opengl.Context, texture *Texture) (*Framebuffe
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
w, h := texture.Size()
|
|
||||||
return &Framebuffer{
|
return &Framebuffer{
|
||||||
native: f,
|
native: f,
|
||||||
width: w,
|
width: texture.width,
|
||||||
height: h,
|
height: texture.height,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,6 @@ type Texture struct {
|
|||||||
height int
|
height int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Texture) Size() (width, height int) {
|
|
||||||
return t.width, t.height
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewTexture(c *opengl.Context, width, height int, filter opengl.Filter) (*Texture, error) {
|
func NewTexture(c *opengl.Context, width, height int, filter opengl.Filter) (*Texture, error) {
|
||||||
w := int(NextPowerOf2Int32(int32(width)))
|
w := int(NextPowerOf2Int32(int32(width)))
|
||||||
h := int(NextPowerOf2Int32(int32(height)))
|
h := int(NextPowerOf2Int32(int32(height)))
|
||||||
|
Loading…
Reference in New Issue
Block a user