mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
graphics: Remove Framebuffer.Size
This commit is contained in:
parent
17f4bcbd95
commit
0374bf0538
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user