QtQuick2-and-OpenGL-vs-DirectX-vs-Mesa: Difference between revisions
No edit summary |
(Add to category 3D) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Windows]] | |||
[[Category:Qt5]] | |||
[[Category:3D]] | |||
;QtQuick2 and OpenGL, DirectX or Software Render (Mesa) | |||
QtQuick2 applications require OpenGL 2.0 or OpenGL ES 2.0 which is selected when compiling Qt when using Qt 5.2 and previous and at run time when using Qt 5.3 | QtQuick2 applications require OpenGL 2.0 or OpenGL ES 2.0 which is selected when compiling Qt when using Qt 5.2 and previous and at run time when using Qt 5.3 | ||
Line 5: | Line 9: | ||
That can be a problem when deploying Windows applications to cheaper machines or VMs running under hypervisors in corporate servers. | That can be a problem when deploying Windows applications to cheaper machines or VMs running under hypervisors in corporate servers. | ||
= | = ANGLE vs OpenGL = | ||
ANGLE library is used to translate the OpenGL ES calls to DirectX9 or DirectX11 (if available), so hardware accelaration is used on Windows with either ANGLE or OpenGL. The main difference is that Windows usually ship OpenGL 1.1 and it's Video Card drivers which provide higher versions of OpenGL API. That's the problem that ANGLE builds addresses, older drivers, but not lack of hardware acceleration. | |||
Then enters DirectX11. DirectX11 has a built-in software render that is used automatically if the underlying hardware | Then enters DirectX11. DirectX11 has a built-in software render that is used automatically if the underlying hardware can't provide acceleration. | ||
DirectX11 comes installed with Windows Server 2012, so QtQuick2 with | DirectX11 comes installed with Windows Server 2012, so QtQuick2 with ANGLE works with it in any circunstances. | ||
=Software Render (Mesa)= | = Software Render (Mesa) = | ||
QtQuick2 can run with Mesa software render under windows, as long as you use Qt built for OpenGL 2.0. The | QtQuick2 can run with Mesa software render under windows, as long as you use Qt built for OpenGL 2.0. The ANGLE build will not work as it won't load Mesa library. | ||
This option will work with cheaper or older machines as well as VMs running under hypervisors. | This option will work with cheaper or older machines as well as VMs running under hypervisors. | ||
Line 22: | Line 26: | ||
Prebuilt binaries for Mesa are available from the MSYS2 project: | Prebuilt binaries for Mesa are available from the MSYS2 project: | ||
* [http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686/mingw-w64-i686-mesa-10.0.2-1-any.pkg.tar.xz Mesa 10.0.2 for Windows 32-bit binary] | |||
* [http://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64/mingw-w64-x86_64-mesa-10.0.2-1-any.pkg.tar.xz Mesa 10.0.2 for Windows 64-bit binary] | |||
You can also build Mesa yourself, following these [http://wiki.qt.io/Cross-compiling-Mesa-for-Windows instructions] | |||
You can also build Mesa yourself, following these [ | |||
Latest revision as of 15:47, 23 November 2016
- QtQuick2 and OpenGL, DirectX or Software Render (Mesa)
QtQuick2 applications require OpenGL 2.0 or OpenGL ES 2.0 which is selected when compiling Qt when using Qt 5.2 and previous and at run time when using Qt 5.3
That can be a problem when deploying Windows applications to cheaper machines or VMs running under hypervisors in corporate servers.
ANGLE vs OpenGL
ANGLE library is used to translate the OpenGL ES calls to DirectX9 or DirectX11 (if available), so hardware accelaration is used on Windows with either ANGLE or OpenGL. The main difference is that Windows usually ship OpenGL 1.1 and it's Video Card drivers which provide higher versions of OpenGL API. That's the problem that ANGLE builds addresses, older drivers, but not lack of hardware acceleration.
Then enters DirectX11. DirectX11 has a built-in software render that is used automatically if the underlying hardware can't provide acceleration.
DirectX11 comes installed with Windows Server 2012, so QtQuick2 with ANGLE works with it in any circunstances.
Software Render (Mesa)
QtQuick2 can run with Mesa software render under windows, as long as you use Qt built for OpenGL 2.0. The ANGLE build will not work as it won't load Mesa library.
This option will work with cheaper or older machines as well as VMs running under hypervisors.
To use the software render, simply download opengl32.dll from one of the sources below and place it with your executable. Make sure to use Qt built for Desktop OpenGL.
Prebuilt binaries for Mesa are available from the MSYS2 project:
You can also build Mesa yourself, following these instructions