graphics: Remove Framebuffer.Size

This commit is contained in:
Hajime Hoshi 2016-06-03 03:02:59 +09:00
parent 17f4bcbd95
commit 0374bf0538

View File

@ -64,10 +64,6 @@ func NewFramebufferFromTexture(c *opengl.Context, texture *Texture) (*Framebuffe
}, nil }, nil
} }
func (f *Framebuffer) Size() (width, height int) {
return f.width, f.height
}
func (f *Framebuffer) Dispose(c *opengl.Context) error { func (f *Framebuffer) Dispose(c *opengl.Context) error {
// Don't delete the default framebuffer. // Don't delete the default framebuffer.
if f.native == opengl.ZeroFramebuffer { if f.native == opengl.ZeroFramebuffer {
@ -119,8 +115,7 @@ func (f *Framebuffer) DrawTexture(context *opengl.Context, t *Texture, vertices
} }
func (f *Framebuffer) Pixels(c *opengl.Context) ([]uint8, error) { func (f *Framebuffer) Pixels(c *opengl.Context) ([]uint8, error) {
w, h := f.Size() return c.FramebufferPixels(f.native, f.width, f.height)
return c.FramebufferPixels(f.native, w, h)
} }
func (f *Framebuffer) ReplacePixels(context *opengl.Context, t *Texture, p []uint8) error { func (f *Framebuffer) ReplacePixels(context *opengl.Context, t *Texture, p []uint8) error {