/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \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 which have been
    optimized for each of these types.

    It is possible to combine code written in the OpenGL graphics API
    with both 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 the 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 Overview

    \include module-use.qdocinc using qt module
    \snippet snippets/CMakeLists.txt cmake_use

    See also the \l {Build with CMake} overview.

    \include module-use.qdocinc building with qmake
    \snippet snippets/snippets.pro qmake_use

    \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.


    \section1 Related Information

    These are links to the API reference materials and related pages.

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

*/
