Commit graph

75 commits

Author SHA1 Message Date
Ilya Fedin
4dd604e61e Ensure temporaries don't detach with range loop 2023-12-29 12:59:09 +00:00
Ilya Fedin
83f12e2dd0 QString::arg usage optimization 2023-12-29 12:59:09 +00:00
Ilya Fedin
06360dea67 Fix missing include 2023-12-07 08:19:33 +04:00
Ilya Fedin
367a64aa1f Fix Qt's texture use-after-free with HiDPI 2023-12-06 17:51:23 +04:00
Ilya Fedin
b1d5c7c116 Allow Ui::GL::CheckCapapilities to work without QWidget 2023-11-21 09:08:01 +04:00
John Preston
f9b24c7551 Fix build on Windows. 2023-11-13 11:26:07 +04:00
Ilya Fedin
23ce4f09df Rp{Widget,Window}NoRhi ->Rp{Widget,Window}OpenGL
This is more explicit
2023-11-01 09:15:48 +04:00
John Preston
c538357107 Implement QOpenGLWidget wrong fbo size workaround. 2023-09-12 11:38:06 +04:00
John Preston
b49ee81df9 Disable OpenGL ANGLE backend.
Currently ANGLE can work through desktop OpenGL only with enabled
attribute EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE.

Qt can't work with it enabled and shows vertically flipped content.
2023-08-10 14:34:33 +02:00
Ilya Fedin
7c9aa94533 Fix kUseNativeChild with Qt 6.4+ 2023-04-27 16:52:58 +04:00
John Preston
79b6cd347c Make a more robust check of OpenGL init. 2023-04-27 10:57:21 +04:00
Ilya Fedin
f5fb567052 Take advantage of RHI
Use Metal with Qt 6.4+ and macOS 10.14+, OpenGL for Wayland whenever enabled
2023-04-03 16:03:08 +04:00
John Preston
c80df2cdd2 Ensure correct FBO size in QOpenGLWidget. 2023-03-13 15:56:17 +04:00
Ilya Fedin
503320296d Use NVIDIA blacklist on any system using desktop-app's Linux platform code 2023-03-12 23:53:16 +04:00
Ilya Fedin
f3744c4ba3 Use paintGL instead of paintEvent
Hopefully making GL code less crashy by using the respective initialization code
2023-03-09 11:07:18 +04:00
Ilya Fedin
d2fddd8da6 Make the default rendering backend choosing logic public 2023-02-28 16:17:40 +04:00
John Preston
8e6811aef0 Allow custom ChooseBackend hook in RpWindow. 2023-02-10 20:10:42 +04:00
Ilya Fedin
48a34dc746 Get rid of QSurface::supportsOpenGL check
It checks for surface type to be compatible with OpenGL, but there's no guarantee raster surface would return true here and once it's converted to an OpenGL surface, there's no need to check as it's known to support OpenGL.

This is the case with all QWidgets in Qt 6.4.
2022-07-19 19:44:06 +04:00
John Preston
8700c2223a Add NV12 -> RGB shader. 2022-03-22 19:46:19 +04:00
John Preston
bbae1c2ae7 Add AllowLinuxNvidiaOpenGL option. 2022-02-02 15:20:46 +03:00
John Preston
3177c78bda Disable OpenGL on NVIDIA driver on Linux. 2021-10-22 19:39:09 +04:00
Ilya Fedin
8e5d35229a Simple replacements for Qt 6
QStringRef -> QStringView
QTextCursor constructor accepts a QTextDocument only
Some headers are moved, so paths are removed
QMatrix -> QTransform
Methods returning qsizetype are wrapped to int()s to allow compiler to deduce the type
2021-10-19 17:06:25 +04:00
John Preston
29cfdad44c Fix one more crash on context loss. 2021-09-23 17:37:03 +04:00
John Preston
5b521d63a4 Allow QSurfaceFormat::NoProfile in OpenGL detection. 2021-09-09 16:31:32 +03:00
John Preston
29f339e26e Allow Ui::GL::Renderer::deinit on lost context. 2021-09-03 21:41:12 +03:00
John Preston
d452ae8ba6 Rename Ui::Window to Ui::RpWindow. 2021-07-28 16:23:27 +03:00
John Preston
17123c08ab Define 'KHRONOS_STATIC' globally. 2021-07-26 14:08:04 +03:00
John Preston
49166a8b72 Fix build on Linux. 2021-07-23 20:41:38 +03:00
John Preston
2d251e063c Fix build on macOS. 2021-07-23 19:36:28 +03:00
John Preston
1ed242718e Fix linker warning in MSVC. 2021-07-23 15:12:16 +03:00
John Preston
12429c198d Provide custom gpu_driver_bug_list.json on Windows. 2021-07-23 10:36:17 +03:00
John Preston
2439235e42 Remove CurrentSingleComponentFormat. 2021-07-22 15:49:33 +03:00
John Preston
e68f76e6ab List and allow to query EGL extensions on Windows. 2021-07-21 21:18:04 +03:00
John Preston
27fd82a365 Set correct alpha size in QWindow format.
This somehow fixes Direct3D 11 ANGLE backend colors issue.
2021-07-21 21:16:46 +03:00
John Preston
0ad1d2c965 Check shader compiling/linking in detection. 2021-07-17 12:43:35 +03:00
John Preston
ed6c2cb541 Use GL_BGRA_EXT format with ANGLE. 2021-07-14 20:03:22 +03:00
Ilya Fedin
b8485c0d8a Fix -Wunused-variable warnings 2021-07-13 21:24:22 +03:00
Ilya Fedin
f0c474c6ae Fix clang warnings
Fixes -Wrange-loop-construct and -Wdeprecated-enum-enum-conversion
2021-07-13 20:16:48 +03:00
John Preston
3b3413e618 Try disabling native child OpenGL workaround. 2021-07-02 00:37:17 +03:00
John Preston
ac97c608c8 Fix D3D11on12 backend choosing. 2021-07-01 10:45:42 +03:00
John Preston
7577f063a6 Allow settings ANGLE backends. 2021-07-01 00:12:52 +03:00
John Preston
9255d71038 Suggest single-component texture format. 2021-06-30 11:47:15 +03:00
John Preston
98ba824bde Return OpenGL window on macOS and Linux. 2021-06-23 19:47:57 +04:00
John Preston
a009efc50d Fix expose bug for frameless OpenGL window. 2021-06-23 15:42:38 +04:00
John Preston
f646439624 Fix full screen OpenGL native child window. 2021-06-21 11:28:53 +04:00
John Preston
685db2ab5e Simplify native child OpenGL window creation. 2021-06-21 10:27:11 +04:00
John Preston
bd989cb67f Fix OpenGL detection on WA_NativeWindow widgets. 2021-06-18 22:53:44 +04:00
John Preston
34a867b2a0 Fix move between Retina / Non-Retina. 2021-06-16 10:29:22 +04:00
John Preston
4837b47623 Fix Image::texturedRect() before Image::bind(). 2021-06-15 16:47:06 +04:00
John Preston
27e9e349bf Fix working using OpenGLES / ANGLE. 2021-06-14 12:13:33 +04:00