summaryrefslogtreecommitdiffstats
path: root/src/opengl/doc/src/qtopengl-index.qdoc
blob: 7ea163582756abbf9d8191eab58ba165a9bfdbf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page qtopengl-index.html
    \title Qt OpenGL
    \brief The Qt OpenGL module offers classes that make it easy to
    use OpenGL in Qt applications.


    Qt has two main approaches to UI development: \l[QtQuick]{Qt Quick} and
    \l{Qt Widgets}. They exist to support different types of user
    interfaces, and build on separate graphics engines that have been
    optimized for each of these types.

    It is possible to combine code written in the OpenGL graphics API
    with both of these user interface types in Qt. This can be useful
    when the application has its own OpenGL-dependent code, or when it
    is integrating with a third-party OpenGL-based renderer.

    The Qt OpenGL module contains convenience classes to make this type of
    integration easier and faster.

    \section1 Qt OpenGL and Qt Widgets

    \l{Qt Widgets} is typically rendered by a highly optimized and accurate
    software rasterizer, and the final content reproduced on screen using a
    method appropriate for the platform where the application is running.

    But it is also possible to combine \l{Qt Widgets} with OpenGL. The main entry
    point for this is the \l{QOpenGLWidget} class. This class can be used to
    enable OpenGL rendering for a certain part of the widget tree, and the
    classes in the Qt OpenGL module can be used to facilitate any application-side
    OpenGL code.

    \section1 Qt OpenGL and Qt Quick

    \l[QtQuick]{Qt Quick} is optimized for hardware-accelerated rendering. By default,
    it will be built on the low-level graphics API most appropriate for the
    target platform.

    For instance, it will default to \c Direct3D on Windows, whereas on macOS,
    it will default to \c Metal. But it is also possible to manually
    select OpenGL as the active graphics API on platforms where this is supported.

    For more details on enabling OpenGL with \l[QtQuick]{Qt Quick}, see
    \l{Rendering via the Qt Rendering Hardware Interface}{scenegraph renderer documentation}.

    \section1 Using the Module

    \include {module-use.qdocinc} {using the c++ api}

    \section2 Building with CMake

    \include {module-use.qdocinc} {building with cmake} {OpenGL}

    \section2 Building with qmake

    \include {module-use.qdocinc} {building_with_qmake} {opengl}

    \section1 Examples

    \list
        \li \l {Qt OpenGL Examples}
    \endlist

    \section1 Reference

    \list
        \li \l {Qt OpenGL C++ Classes} {C++ Classes}
    \endlist

    \section1 Module Evolution
    \l{Changes to Qt OpenGL} lists important changes in the module API
    and functionality that were done for the Qt 6 series of Qt.

    \section1 Licenses and Trademarks

    The Qt OpenGL module is available under commercial licenses from
    \l{The Qt Company}. In addition, it is available under free software
    licenses:
    The \l{GNU Lesser General Public License, version 3}, or
    the \l{GNU General Public License, version 2}.
    See \l{Qt Licensing} for further details.

    OpenGL\reg is a trademark of Silicon Graphics, Inc. in
    the United States and other countries.
*/