-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Tool previews laggy after hardware acceleration is turned on #3584
Comments
The QOpenGLWidget causes the entire window to switch to an OpenGLSurface, but it doesn't automatically switch back to a RasterSurface when the last QOpenGLWidget is deleted again. Closes mapeditor#3584
It's an issue I had known about for a while, and I was about to reply it was a Qt issue, but then I found out a way to restore the non-OpenGL state so it should be fixed by #3587. :-) |
The QOpenGLWidget causes the entire window to switch to an OpenGLSurface, but it doesn't automatically switch back to a RasterSurface when the last QOpenGLWidget is deleted again. Closes mapeditor#3584
So if I understand correctly, the lag with hardware acceleration is a Qt issue and can't be fixed? |
It might be worth looking into whether it can be reduced, even when hardware acceleration is kept on. But I think this lag is mostly due to the vsync. |
This essentially disabled vsync, though with composited window managers there should not be visible tearing anyway. It does seem to affect animation timing as well though, which affects scrolling with arrow keys. Related to issue mapeditor#3584
I don't see a difference with that build, the cursor is still laggy with hardware acceleration on. On the bright side, I also didn't notice additional stuttering with the arrow keys. I even tried turning vsync off in my GPU settings (with and without restarting Tiled), no effect. On the bright side, turning hardware acceleration off removes the lag now, so that change works :D |
The QOpenGLWidget causes the entire window to switch to an OpenGLSurface, but it doesn't automatically switch back to a RasterSurface when the last QOpenGLWidget is deleted again. Closes #3584
Ok, since it apparently doesn't work reliably and when it works there may be some stuttering, I'm leaving out that change for now, and just merged the change that properly disables hardware acceleration again. |
Tool previews, such as the stamp brush preview, become laggy after hardware acceleration is turned on, even if it's turned back off.
Restarting Tiled after turning hardware acceleration off and not turning it back on again "fixes" the issue, and the tool previews follow the mouse cursor without delay again.
The lag is slight, but it's enough to be quite annoying. It feels like it's perhaps a frame or so behind.
In this GIF, I first have a freshly started Tiled with no hardware acceleration, there's no lag. Then, I turn on hardware acceleration and the lag appears. Then, I turn it off and the lag persists.
Encountered on Tiled 1.9.1 and 2023.02.17 (Qt6) on Win10 x64.
The text was updated successfully, but these errors were encountered: