/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCanvas3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \qmlmodule QtCanvas3D 1.1
    \title Qt Canvas 3D QML Types
    \ingroup qmlmodules

    \brief QML types for the Qt Canvas 3D API.

    The Qt Canvas 3D functionality can be accessed via these QML types.
*/

/*!
    \group qtcanvas3d-examples
    \ingroup all-examples
    \title Qt Canvas 3D Examples

    \brief Examples for the Qt Canvas 3D module.
*/

/*!
    \page qtcanvas3d-getting-started.html
    \title Qt Canvas 3D Getting Started

    \section1 Building Qt Canvas 3D

    To build the Qt Canvas 3D module from source code, set up a command prompt
    with an environment for building Qt applications, navigate to the
    directory containing \c {qtcanvas3d.pro}, and configure the project with
    qmake:

    \badcode
    qmake
    \endcode

    After running qmake, build the project with make:
    \table
    \header
      \li OS                       \li Make command
    \row
      \li Linux                    \li make
    \row
      \li Windows (MinGw)          \li mingw32-make
    \row
      \li Windows (MSVC)           \li nmake
    \row
      \li OSX                      \li make
    \endtable

    The above generates the default makefiles for your configuration, which is
    typically the release build if you are using precompiled binary Qt
    distribution. To build both debug and release, or one specifically, use
    one of the following qmake lines instead.

    For debug builds:
    \badcode
    qmake CONFIG+=debug
    make
    \endcode
    or
    \badcode
    qmake CONFIG+=debug_and_release
    make debug
    \endcode

    For release builds:
    \badcode
    qmake CONFIG+=release
    make
    \endcode
    or
    \badcode
    qmake CONFIG+=debug_and_release
    make release
    \endcode

    For both builds (Windows/Mac only):
    \badcode
    qmake CONFIG+="debug_and_release build_all"
    make
    \endcode

    After building, install the module to your Qt directory:
    \badcode
    make install
    \endcode

    If you want to uninstall the module:
    \badcode
    make uninstall
    \endcode

    To build a statically linked version of the QtCanvas3D module, give the
    following commands:

    \badcode
    qmake CONFIG+=static
    make
    make install
    \endcode

    \section1 Running the Examples

    Examples for Qt Canvas 3D are found under the \c examples/canvas3d
    subdirectory. To build and run a single example, in this case
    \c{interaction}, navigate to the example directory and enter the
    following commands:

    \badcode
    qmake
    make
    ./interaction
    \endcode

    \note On some platforms, such as Windows, the executable can be generated
    under \c debug or \c release folders, depending on your build.

    \section1 A Basic Example

    For a simple Canvas3D example, see the \l {Lit and Textured Cube Example}.

    For all examples, check out \l {Qt Canvas 3D Examples}.

    \section1 Creating Qt Canvas 3D Project

    For convenience, Qt Canvas 3D comes with a Qt Creator wizard template. The template is
    provided with the source package and can be found under \e{creatortemplates} folder. The Qt
    Canvas 3D wizard creates a project that includes QML and JavaScript files. It also has, by
    default, code that draws a cube.

    In order to use the wizard template it needs to be copied to the correct location. For more
    details of the correct location, please see
    \l {http://doc.qt.io/qtcreator/creator-project-wizards.html#locating-wizards}{Locating Wizards}.
*/

/*!
    \page qtcanvas3d-logging.html
    \title Qt Canvas 3D Logging

    \brief The logging features in Qt Canvas 3D.

    Qt Canvas 3D makes use of Qt's \l {QLoggingCategory}{categorized logging}.
    The following categories are supported:

    \table
    \header \li Category \li Description
    \row \li \c qt.canvas3d.info.debug
         \li Logs on high level information about the OpenGL driver.
    \row \li \c qt.canvas3d.rendering.debug
         \li Logs all the method calls in Qt Canvas 3D.
    \row \li \c qt.canvas3d.rendering.warning
         \li Logs all warnings on from Qt Canvas 3D internal verifications
             that happen before a OpenGL method call is made to the actual
             graphics driver.
    \row \li \c qt.canvas3d.glerrors.debug
         \li Enables logging OpenGL driver level errors after each OpenGL command issued by the
             application. This entails calling synchronous \c{glGetError()} after each OpenGL
             call, which will cause a negative performance hit. Please use only when necessary
             to find root causes of rendering errors. Also note that the detected OpenGL errors
             are actually logged as warning messages instead of debug messages.
    \row \li \c qt.canvas3d.glerrors.warning
         \li Logs OpenGL driver level errors when executing synchronous OpenGL commands issued by
             the application. If \c qt.canvas3d.glerrors.debug is also enabled, logs OpenGL errors
             after all OpenGL calls issued by the application.
    \endtable
*/

/*!
 * \page qtcanvas3d-conformance-issues-html
 * \title Qt Canvas 3D Known WebGL Conformance Issues
 *
 * \brief Known WebGL conformance issues
 *
 * \list
 *      \li No emulation for vertex attrib 0 arrays. Always have vertex attrib 0 array enabled.
 *      In desktop OpenGL on some platforms (for example \macos), nothing gets drawn if vertex attrib
 *      0 is not array-enabled. You can use bindAttribLocation() to force a vertex attribute to use
 *      location 0, and use enableVertexAttribArray() to make it array-enabled.
 *
 *      \li No special error detection for binding attributes to overlapping locations
 *      (i.e. attribute aliasing) when linking a shader program.
 *
 *      \li The drawArrays and drawElements calls don't check for the validity of the enabled
 *      attributes or the buffers they point to.
 *
 *      \li Enabling the stencil context attribute also forces the depth attribute to be enabled.
 *
 *      \li Disabling alpha context attribute does not work on some platforms.
 *
 *      \li Trying to set canvas size to MAX_VIEWPORT_DIMS may result in OUT_OF_MEMORY on some
 *      graphics cards.
 *
 *      \li The following extra methods exist for contexts: objectNameChanged, nameChanged,
 *      canvasChanged, drawingBufferWidthChanged, and drawingBufferHeightChanged.
 *
 *      \li Canvas3D doesn't have toDataUrl() method.
 *
 *      \li Canvas3D item can't be given as a parameter to
 *      \l{Context2D::drawImage()}{Context2D.drawImage()}.
 * \endlist
 */
