Closed minseungchoi closed 1 year ago
Currently there is severe screen tearing on 40HrFitness. It appears that Vsync isn't really working, as the benchmark framerate suggests that it's rendering frames faster than the screen refresh rate. Also, even without Vsync, in the old version, screen didn't tear as badly. I tried using PyQt5's QOpenGlWidget and got the same outcome. So it seems that this has less to do with Qt version and more to do with QOpenGlWidget vs QGLWidget of the past.
Here's potentially a clue as to what's going on: https://doc.qt.io/qt-6/qopenglwidget.html#alternatives
Adding a QOpenGLWidget into a window turns on OpenGL-based compositing for the entire window. In some special cases this may not be ideal, and the old QGLWidget-style behavior with a separate, native child window is desired. Desktop applications that understand the limitations of this approach (for example when it comes to overlaps, transparency, scroll views and MDI areas), can use QOpenGLWindow with QWidget::createWindowContainer(). This is a modern alternative to QGLWidget and is faster than QOpenGLWidget due to the lack of the additional composition step. It is strongly recommended to limit the usage of this approach to cases where there is no other choice. Note that this option is not suitable for most embedded and mobile platforms, and it is known to have issues on certain desktop platforms (e.g. macOS) too. The stable, cross-platform solution is always QOpenGLWidget.
For installing QT6 on Ubuntu versions < 22.04:
sudo add-apt-repository ppa:savoury1/qt-6-2
sudo apt-get update
sudo apt install qt6-base-dev
(When all the issues above are resolved)
To check: