diff options
Diffstat (limited to 'src/gui/doc/src/qtgui-overview.qdoc')
-rw-r--r-- | src/gui/doc/src/qtgui-overview.qdoc | 85 |
1 files changed, 73 insertions, 12 deletions
diff --git a/src/gui/doc/src/qtgui-overview.qdoc b/src/gui/doc/src/qtgui-overview.qdoc index ecd34f0e9e..446479c9be 100644 --- a/src/gui/doc/src/qtgui-overview.qdoc +++ b/src/gui/doc/src/qtgui-overview.qdoc @@ -51,6 +51,68 @@ that prefer more low-level APIs to text and font handling can use classes like QRawFont and QGlyphRun. + \section1 RHI Graphics + + The Qt Rendering Hardware Interface is an abstraction for hardware accelerated + graphics APIs, such as, \l{https://www.khronos.org/opengl/}{OpenGL}, + \l{https://www.khronos.org/opengles/}{OpenGL ES}, + \l{https://docs.microsoft.com/en-us/windows/desktop/direct3d}{Direct3D}, + \l{https://developer.apple.com/metal/}{Metal}, and + \l{https://www.khronos.org/vulkan/}{Vulkan}. + + As an alternative to using OpenGL or Vulkan directly to render to a + QWindow, \l QRhi and the related classes provide a portable, cross-platform + 3D graphics and compute API complemented by a shader conditioning and + transpiling pipeline. This way applications can avoid directly depending on + a single, and, in some cases, vendor or platform-specific 3D API. + + Below is a list of the main RHI-related classes. These are complemented by + a number of additional classes and structs. + + \list + \li QRhi + \li QShader + \li QShaderDescription + \li QRhiCommandBuffer + \li QRhiResourceUpdateBatch + \li QRhiBuffer + \li QRhiRenderBuffer + \li QRhiTexture + \li QRhiSampler + \li QRhiTextureRenderTarget + \li QRhiShaderResourceBindings + \li QRhiGraphicsPipeline + \li QRhiComputePipeline + \li QRhiSwapChain + \endlist + + See the \l{RHI Window Example} for an introductory example of creating a + portable, cross-platform application that performs accelerated 3D rendering + onto a QWindow using QRhi. + + Working directly with QWindow is the most advanced and often the most + flexible way of rendering with the QRhi API. It is the most low-level + approach, however, and limited in the sense that Qt's UI technologies, + widgets and Qt Quick, are not utilized at all. In many cases applications + will rather want to integrate QRhi-based rendering into a widget or Qt + Quick-based user interface. QWidget-based applications may choose to embed + the window as a native child into the widget hierarchy via + QWidget::createWindowContainer(), but in many cases \l QRhiWidget will + offer a more convenient enabler to integrate QRhi-based rendering into a + widget UI. Qt Quick provides its own set of enablers for extending the + 2D/3D scene with QRhi-based custom rendering. + + \note The RHI family of APIs are currently offered with a limited + compatibility guarantee, as opposed to regular Qt public APIs. See \l QRhi + for details. + + \section1 3D Matrix and Vector Math + + The Qt GUI module also contains a few math classes to aid with the most + common mathematical operations related to 3D graphics. These classes + include \l {QMatrix4x4}, \l {QVector2D}, \l {QVector3D}, \l {QVector4D}, + and \l {QQuaternion}. + \section1 OpenGL and OpenGL ES Integration QWindow supports rendering using OpenGL and OpenGL ES, depending on what the @@ -86,10 +148,6 @@ For more information, see the \l {OpenGL Window Example}. - The Qt GUI module also contains a few math classes to aid with the most - common mathematical operations related to 3D graphics. These classes include - \l {QMatrix4x4}, \l {QVector4D}, and \l {QQuaternion}. - A \l {QWindow} created with the \l {QSurface::OpenGLSurface} can be used in combination with \l QPainter and \l QOpenGLPaintDevice to have OpenGL hardware-accelerated 2D graphics by sacrificing some of the visual quality. @@ -104,20 +162,23 @@ On Android, Vulkan headers were added in API level 24 of the NDK. - Relevant classes: + The main relevant classes for low-level Vulkan support are: \list - \li QVulkanDeviceFunctions - \li QVulkanExtension - \li QVulkanFunctions - \li QVulkanInfoVector \li QVulkanInstance - \li QVulkanWindow - \li QVulkanWindowRenderer + \li QVulkanFunctions + \li QVulkanDeviceFunctions \endlist + In addition, \l QVulkanWindow provides a convenience subclass of QWindow + that makes it easier to get started with implementing Vulkan-based + rendering targeting a QWindow. Using this helper class is completely + optional; applications with more advanced Vulkan-based renderers may + instead want to use a QWindow with the \l {QSurface::VulkanSurface} type + directly. + For more information, see the \l{Hello Vulkan Widget Example} - and the \l {Hello Vulkan Window Example}. + and the \l {Hello Vulkan Triangle Example}. \section1 Drag and Drop |