Open tinne26 opened 1 year ago
Checked GPU/CPU/RAM usage for the programs on Windows 11 (with the task manager, don't know how precise the values are):
I think GPU usage values can be quite revealing.
Have you tried the latest build in 2.5? I'm curious if this change affected things at all: https://github.com/hajimehoshi/ebiten/issues/2375
The issue in that linked bug turned out to be not specific to android, and since it's in restorable images, I believe it affects both directx and opengl.
I see. Thanks for clarifying.
@corfe83 funny story: I actually saw the issue and caught the commit by chance when not even 5 minutes had passed! I immediately tested it but nothing changed, and I imagined something along the lines of what Hajime said. I was also hyped by that commit, hahaha.
Today I tested ebitenginesinglethread
and v2.5.0 to see if there were any changes. Everything remains the same. But I've had another idea... is it possible that Ebitengine's atlasing is causing a non-trivial texture send to the GPU, explaining part of the difference? In contrast, GLFW only sets up a simple shader, but may not be transfering any texture info. I was wondering it this could be tested in any way. It may have nothing to do with it, I don't know enough about Ebitengine's internals regarding this specific point, but it doesn't sound that crazy either.
Edit: or maybe, knowing Ebitengine's exact atlas size, we could try to pass a texture of the same size to GLFW to level the playing field?
I made a simple test program that only paints the screen yellow, in windowed mode and 640x480 resolution, both in GLFW and Ebitengine. The results are the following:
I've made a couple gists for the GLFW code and the Ebitengine code that I used to obtain these results.
While these are toy programs and we shouldn't immediately jump to conclusions (for example, notice how using or not using
gl.Clear
has a drastic effect in GLFW's performance (gl.Clear
is a very expensive operation, though)), two things stand out: