hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
10.41k stars 635 forks source link

examples/skipdraw: wrong rendering result with `SetScreenClearedEveryFrame(false)` #2952

Open hajimehoshi opened 3 months ago

hajimehoshi commented 3 months ago

Ebitengine Version

Both v2.6.7 and v2.7.0

Operating System

Go Version (go version)

go version go1.22.0 linux/arm64

What steps will reproduce the problem?

Run github.com/crgimenes/neko commit: eb5fed9b4f321d7914da25d03e88c0710d423c02

What is the expected result?

The rendering result is correct

https://github.com/hajimehoshi/ebiten/assets/16950/1ad4c010-fbd3-4140-bf59-6d98460f6809

What happens instead?

The rendering result is not correct

Anything else you feel useful to add?

This issue is forked from #2951

After removing SetScreenClearedEveryFrame(false) and fixing the code to always render the sprite, the issue was fixed.

hajimehoshi commented 3 months ago

This could be reproduced with examples/skipdraw.

https://github.com/hajimehoshi/ebiten/assets/16950/a9106b6e-f19d-48c2-ba16-72bc16e4ebb6

hajimehoshi commented 3 months ago

This doesn't seem a fixable issue as vsync doesn't work in my environment

       _,met$$$$$gg.          parallels@debian-gnu-linux-12 
    ,g$$$$$$$$$$$$$$$P.       ----------------------------- 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 12 (bookworm) aarch64 
 ,$$P'              `$$$.     Host: Parallels ARM Virtual Machine 0.1 
',$$P       ,ggs.     `$$b:   Kernel: 6.1.0-9-arm64 
`d$$'     ,$P"'   .    $$$    Uptime: 5 hours, 6 mins 
 $$P      d$'     ,    $$P    Packages: 1905 (dpkg) 
 $$:      $$.   -    ,d$$'    Shell: bash 5.2.15 
 $$;      Y$b._   _,d$P'      Resolution: 1800x1126 
 Y$$.    `.`"Y$$$$P"'         DE: Cinnamon 5.6.8 
 `$$b      "-.__              WM: Mutter (Muffin) 
  `Y$$                        WM Theme: cinnamon (Default) 
   `Y$$.                      Theme: Adwaita [GTK2/3] 
     `$$b.                    Icons: gnome [GTK2/3] 
       `Y$$b.                 Terminal: gnome-terminal 
          `"Y$b._             CPU: (2) 
              `"""            GPU: 00:0a.0 Red Hat, Inc. Virtio 1.0 GPU 
                              Memory: 1081MiB / 1978MiB 
SolsticeSpectrum commented 3 months ago

@hajimehoshi If you send me the example skipdraw code, I can test it on my machine. Idk if that would help in any way.

hajimehoshi commented 3 months ago

Thanks. I need to test this with a proper Linux machine rather than a Parallels VM first.