graphics: Remove Texture.Size

This commit is contained in:
Hajime Hoshi 2016-06-03 03:07:55 +09:00
parent 0374bf0538
commit efd019c00e
2 changed files with 2 additions and 7 deletions

View File

@ -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
} }

View File

@ -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)))