Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ebiten: calling Fill and Set, and resizing the window breaks the rendering #2089

Closed
hajimehoshi opened this issue May 8, 2022 · 1 comment
Labels
Milestone

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented May 8, 2022

package main

import (
	"image/color"

	"github.com/hajimehoshi/ebiten/v2"
)

type Game struct{}

func (self *Game) Layout(w, h int) (int, int) { return w, h }
func (self *Game) Update() error              { return nil }
func (self *Game) Draw(screen *ebiten.Image) {
	screen.Fill(color.RGBA{255, 0, 0, 255})
	screen.Set(1, 1, color.Black)
}

func main() {
	ebiten.SetWindowResizable(true)
	ebiten.RunGame(&Game{})
}

https://gyazo.com/e46519b18fc315e2df2a47cd267c5c91

(The minimum test case by created by @Zyko0 and Tinne)

@hajimehoshi hajimehoshi added the bug label May 8, 2022
@hajimehoshi hajimehoshi added this to the v2.3.2 milestone May 8, 2022
@hajimehoshi
Copy link
Owner Author

fc96eb3 is the culprit.

hajimehoshi added a commit that referenced this issue May 8, 2022
 * Fixed wrong operator orders
 * Cleared an allocated region explicitlly

Closes #2089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant