summaryrefslogtreecommitdiffstats
path: root/src/imports/qtcanvas3d/doc/src/qtcanvas3d.qdoc
blob: 61cdfe7378c53f02b23dc890d02a574505c485f3 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/****************************************************************************
**
** Copyright (C) 2016 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$
**
****************************************************************************/

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

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

    \b{Canvas3D module was deprecated in Qt 5.12.} Depracated modules are no
    longer maintained. They are provided to keep old source code working, but
    they can be removed in a future release. We strongly advise against using
    deprecated modules in new code or project.
*/

/*!
    \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

    \b{Canvas3D module was deprecated in Qt 5.12.} Depracated modules are no
    longer maintained. They are provided to keep old source code working, but
    they can be removed in a future release. We strongly advise against using
    deprecated modules in new code or project.

    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.

    \b{Canvas3D module was deprecated in Qt 5.12.} Depracated modules are no
    longer maintained. They are provided to keep old source code working, but
    they can be removed in a future release. We strongly advise against using
    deprecated modules in new code or project.

    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
 *
 * \b{Canvas3D module was deprecated in Qt 5.12.} Depracated modules are no
 * longer maintained. They are provided to keep old source code working, but
 * they can be removed in a future release. We strongly advise against using
 * deprecated modules in new code or project.
 *
 * 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
 */