mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphicscontext: Rename createFramebufferIfNeeded -> ensureFramebuffer
This commit is contained in:
parent
61c2331ac4
commit
3a8ddd6279
@ -230,7 +230,7 @@ func (c *drawImageCommand) String() string {
|
||||
|
||||
// Exec executes the drawImageCommand.
|
||||
func (c *drawImageCommand) Exec(indexOffsetInBytes int) error {
|
||||
f, err := c.dst.createFramebufferIfNeeded()
|
||||
f, err := c.dst.ensureFramebuffer()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -343,7 +343,7 @@ type pixelsCommand struct {
|
||||
|
||||
// Exec executes a pixelsCommand.
|
||||
func (c *pixelsCommand) Exec(indexOffsetInBytes int) error {
|
||||
f, err := c.img.createFramebufferIfNeeded()
|
||||
f, err := c.img.ensureFramebuffer()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ func (i *Image) IsInvalidated() bool {
|
||||
return !opengl.GetContext().IsTexture(i.texture)
|
||||
}
|
||||
|
||||
func (i *Image) createFramebufferIfNeeded() (*framebuffer, error) {
|
||||
func (i *Image) ensureFramebuffer() (*framebuffer, error) {
|
||||
if i.framebuffer != nil {
|
||||
return i.framebuffer, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user