1/****************************************************************************
2**
3** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
4** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
5** Contact: https://www.qt.io/licensing/
6**
7** This file is part of the Qt3D module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial License Usage
11** Licensees holding valid commercial Qt licenses may use this file in
12** accordance with the commercial license agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and The Qt Company. For licensing terms
15** and conditions see https://www.qt.io/terms-conditions. For further
16** information use the contact form at https://www.qt.io/contact-us.
17**
18** GNU Lesser General Public License Usage
19** Alternatively, this file may be used under the terms of the GNU Lesser
20** General Public License version 3 as published by the Free Software
21** Foundation and appearing in the file LICENSE.LGPL3 included in the
22** packaging of this file. Please review the following information to
23** ensure the GNU Lesser General Public License version 3 requirements
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
25**
26** GNU General Public License Usage
27** Alternatively, this file may be used under the terms of the GNU
28** General Public License version 2.0 or (at your option) the GNU General
29** Public license version 3 or any later version approved by the KDE Free
30** Qt Foundation. The licenses are as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
32** included in the packaging of this file. Please review the following
33** information to ensure the GNU General Public License requirements will
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and
35** https://www.gnu.org/licenses/gpl-3.0.html.
36**
37** $QT_END_LICENSE$
38**
39****************************************************************************/
40
41#include "qt3dquick3drenderplugin.h"
42#include <Qt3DRender/qabstractlight.h>
43#include <Qt3DRender/qalphacoverage.h>
44#include <Qt3DRender/qalphatest.h>
45#include <Qt3DRender/qattribute.h>
46#include <Qt3DRender/qblendequation.h>
47#include <Qt3DRender/qblendequationarguments.h>
48#include <Qt3DRender/qbuffer.h>
49#include <Qt3DRender/qbuffercapture.h>
50#include <Qt3DRender/qcamera.h>
51#include <Qt3DRender/qcameralens.h>
52#include <Qt3DRender/qcameraselector.h>
53#include <Qt3DRender/qclearbuffers.h>
54#include <Qt3DRender/qclipplane.h>
55#include <Qt3DRender/qcolormask.h>
56#include <Qt3DRender/qcomputecommand.h>
57#include <Qt3DRender/qcullface.h>
58#include <Qt3DRender/qdepthrange.h>
59#include <Qt3DRender/qdepthtest.h>
60#include <Qt3DRender/qdirectionallight.h>
61#include <Qt3DRender/qdispatchcompute.h>
62#include <Qt3DRender/qdithering.h>
63#include <Qt3DRender/qeffect.h>
64#include <Qt3DRender/qenvironmentlight.h>
65#include <Qt3DRender/qfilterkey.h>
66#include <Qt3DRender/qfrontface.h>
67#include <Qt3DRender/qfrustumculling.h>
68#include <Qt3DRender/qgeometry.h>
69#include <Qt3DRender/qgeometryrenderer.h>
70#include <Qt3DRender/qgraphicsapifilter.h>
71#include <Qt3DRender/qlayer.h>
72#include <Qt3DRender/qlevelofdetail.h>
73#include <Qt3DRender/qlevelofdetailboundingsphere.h>
74#include <Qt3DRender/qlevelofdetailswitch.h>
75#include <Qt3DRender/qlinewidth.h>
76#include <Qt3DRender/qmemorybarrier.h>
77#include <Qt3DRender/qmesh.h>
78#include <Qt3DRender/qmultisampleantialiasing.h>
79#include <Qt3DRender/qnodepthmask.h>
80#include <Qt3DRender/qnodraw.h>
81#include <Qt3DRender/qobjectpicker.h>
82#include <Qt3DRender/qraycaster.h>
83#include <Qt3DRender/qparameter.h>
84#include <Qt3DRender/qpickevent.h>
85#include <Qt3DRender/qpickingsettings.h>
86#include <Qt3DRender/qpointlight.h>
87#include <Qt3DRender/qpointsize.h>
88#include <Qt3DRender/qpolygonoffset.h>
89#include <Qt3DRender/qrendercapture.h>
90#include <Qt3DRender/qrenderpass.h>
91#include <Qt3DRender/qrenderpassfilter.h>
92#include <Qt3DRender/qrendersettings.h>
93#include <Qt3DRender/qrenderstate.h>
94#include <Qt3DRender/qrendersurfaceselector.h>
95#include <Qt3DRender/qrendertargetoutput.h>
96#include <Qt3DRender/qrendertargetselector.h>
97#include <Qt3DRender/qsceneloader.h>
98#include <Qt3DRender/qscissortest.h>
99#include <Qt3DRender/qseamlesscubemap.h>
100#include <Qt3DRender/qshaderdata.h>
101#include <Qt3DRender/qshaderprogram.h>
102#include <Qt3DRender/qshaderprogrambuilder.h>
103#include <Qt3DRender/qsortpolicy.h>
104#include <Qt3DRender/qspotlight.h>
105#include <Qt3DRender/qstencilmask.h>
106#include <Qt3DRender/qstenciloperation.h>
107#include <Qt3DRender/qstenciloperationarguments.h>
108#include <Qt3DRender/qstenciltest.h>
109#include <Qt3DRender/qstenciltestarguments.h>
110#include <Qt3DRender/qtechnique.h>
111#include <Qt3DRender/qtechniquefilter.h>
112#include <Qt3DRender/qtexture.h>
113#include <Qt3DRender/qviewport.h>
114#include <Qt3DRender/qproximityfilter.h>
115#include <Qt3DRender/qblitframebuffer.h>
116#include <Qt3DRender/qsetfence.h>
117#include <Qt3DRender/qwaitfence.h>
118#include <Qt3DRender/qrastermode.h>
119#include <Qt3DRender/qnopicking.h>
120#include <Qt3DRender/qshaderimage.h>
121
122#include <QtGui/qwindow.h>
123
124#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
125#include <Qt3DQuickRender/private/qt3dquickrender_global_p.h>
126#include <Qt3DQuickRender/private/quick3dbuffer_p.h>
127#include <Qt3DQuickRender/private/quick3deffect_p.h>
128#include <Qt3DQuickRender/private/quick3dgeometry_p.h>
129#include <Qt3DQuickRender/private/quick3dlayerfilter_p.h>
130#include <Qt3DQuickRender/private/quick3dmaterial_p.h>
131#include <Qt3DQuickRender/private/quick3dmemorybarrier_p.h>
132#include <Qt3DQuickRender/private/quick3dparameter_p.h>
133#include <Qt3DQuickRender/private/quick3drenderpass_p.h>
134#include <Qt3DQuickRender/private/quick3drenderpassfilter_p.h>
135#include <Qt3DQuickRender/private/quick3drendertargetoutput_p.h>
136#include <Qt3DQuickRender/private/quick3drendertargetselector_p.h>
137#include <Qt3DQuickRender/private/quick3dscene_p.h>
138#include <Qt3DQuickRender/private/quick3dshaderdata_p.h>
139#include <Qt3DQuickRender/private/quick3dshaderdataarray_p.h>
140#include <Qt3DQuickRender/private/quick3dstateset_p.h>
141#include <Qt3DQuickRender/private/quick3dtechnique_p.h>
142#include <Qt3DQuickRender/private/quick3dtechniquefilter_p.h>
143#include <Qt3DQuickRender/private/quick3dtexture_p.h>
144#include <Qt3DQuickRender/private/quick3dviewport_p.h>
145#include <Qt3DQuickRender/private/quick3draycaster_p.h>
146#include <Qt3DQuickRender/private/quick3dscreenraycaster_p.h>
147
148QT_BEGIN_NAMESPACE
149
150QVariantList Quick3DShaderDataArrayToVariantListConverter(Qt3DRender::Render::Quick::Quick3DShaderDataArray *array)
151{
152 const QVector<Qt3DRender::QShaderData *> arrayValues = array->values();
153 QVariantList values;
154 values.reserve(arrayValues.size());
155 for (Qt3DRender::QShaderData *data : arrayValues)
156 values.append(QVariant::fromValue(data));
157 return values;
158}
159
160void Qt3DQuick3DRenderPlugin::registerTypes(const char *uri)
161{
162 Qt3DRender::Quick::Quick3DRender_initialize();
163
164 qmlRegisterUncreatableType<QWindow>(uri, 2, 0, "Window", "Only for assigning window surface property");
165
166 // Converters
167 QMetaType::registerConverter<Qt3DRender::Render::Quick::Quick3DShaderDataArray*, QVariantList>(Quick3DShaderDataArrayToVariantListConverter);
168
169 // Renderer setttings
170 qmlRegisterType<Qt3DRender::QRenderSettings>(uri, 2, 0, "RenderSettings");
171 qmlRegisterType<Qt3DRender::QPickingSettings>(uri, 2, 0, "PickingSettings");
172
173 // @uri Qt3D.Render
174 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QSceneLoader, Qt3DRender::Render::Quick::Quick3DScene>("QSceneLoader", "Qt3D.Render/SceneLoader", uri, 2, 0, "SceneLoader");
175 qmlRegisterType<Qt3DRender::QSceneLoader, 9>(uri, 2, 9, "SceneLoader");
176 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QEffect, Qt3DRender::Render::Quick::Quick3DEffect>("QEffect", "Qt3D.Render/Effect", uri, 2, 0, "Effect");
177 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTechnique, Qt3DRender::Render::Quick::Quick3DTechnique>("QTechnique", "Qt3D.Render/Technique", uri, 2, 0, "Technique");
178 qmlRegisterType<Qt3DRender::QFilterKey>(uri, 2, 0, "FilterKey");
179 qmlRegisterType<Qt3DRender::QGraphicsApiFilter>(uri, 2, 0, "GraphicsApiFilter");
180 qmlRegisterUncreatableType<Qt3DRender::QParameter>(uri, 2, 0, "QParameter", "Quick3D should instantiate Quick3DParameter only");
181 qmlRegisterType<Qt3DRender::Render::Quick::Quick3DParameter>(uri, 2, 0, "Parameter");
182 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QMaterial, Qt3DRender::Render::Quick::Quick3DMaterial>("QMaterial", "Qt3D.Render/Material", uri, 2, 0, "Material");
183 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QRenderPass, Qt3DRender::Render::Quick::Quick3DRenderPass>("QRenderPass", "Qt3D.Render/RenderPass", uri, 2, 0, "RenderPass");
184 qmlRegisterType<Qt3DRender::QShaderProgram>(uri, 2, 0, "ShaderProgram");
185 qmlRegisterType<Qt3DRender::QShaderProgram, 9>(uri, 2, 9, "ShaderProgram");
186 qmlRegisterType<Qt3DRender::QShaderProgramBuilder>(uri, 2, 10, "ShaderProgramBuilder");
187 qmlRegisterType<Qt3DRender::QShaderProgramBuilder, 13>(uri, 2, 13, "ShaderProgramBuilder");
188 qmlRegisterUncreatableType<Qt3DRender::QShaderData>(uri, 2, 0, "QShaderData", "Quick3D should instantiate Quick3DShaderData only");
189 qmlRegisterType<Qt3DRender::Render::Quick::Quick3DShaderDataArray>(uri, 2, 0, "ShaderDataArray");
190 qmlRegisterType<Qt3DRender::Render::Quick::Quick3DShaderData>(uri, 2, 0, "ShaderData");
191
192 // Camera
193 qmlRegisterType<Qt3DRender::QCamera>(uri, 2, 0, "Camera");
194 qmlRegisterType<Qt3DRender::QCamera, 9>(uri, 2, 9, "Camera");
195 qmlRegisterType<Qt3DRender::QCameraLens>(uri, 2, 0, "CameraLens");
196 qmlRegisterType<Qt3DRender::QCameraLens, 9>(uri, 2, 9, "CameraLens");
197
198 // Textures
199 qmlRegisterType<Qt3DRender::QTextureWrapMode>(uri, 2, 0, "WrapMode");//, QStringLiteral("QTextureWrapMode cannot be created from QML"));
200 qmlRegisterUncreatableType<Qt3DRender::QAbstractTexture>(uri, 2, 0, "Texture", QStringLiteral("Texture should be created from one of the subclasses"));
201 qmlRegisterUncreatableType<Qt3DRender::QAbstractTexture, 13>(uri, 2, 13, "Texture", QStringLiteral("Texture should be created from one of the subclasses"));
202 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture1D, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture1D", "Qt3D.Render/Texture1D", uri, 2, 0, "Texture1D");
203 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture1DArray, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture1DArray", "Qt3D.Render/Texture1DArray", uri, 2, 0, "Texture1DArray");
204 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture2D, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture2D", "Qt3D.Render/Texture2D", uri, 2, 0, "Texture2D");
205 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture2DArray, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture2DArray", "Qt3D.Render/Texture2DArray", uri, 2, 0, "Texture2DArray");
206 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture3D, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture3D", "Qt3D.Render/Texture3D", uri, 2, 0, "Texture3D");
207 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTextureCubeMap, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTextureCubeMap", "Qt3D.Render/TextureCubeMap", uri, 2, 0, "TextureCubeMap");
208 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTextureCubeMapArray, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTextureCubeMapArray", "Qt3D.Render/TextureCubeMapArray", uri, 2, 0, "TextureCubeMapArray");
209 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture2DMultisample, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture2DMultisample", "Qt3D.Render/Texture2DMultisample", uri, 2, 0, "Texture2DMultisample");
210 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTexture2DMultisampleArray, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTexture2DMultisampleArray", "Qt3D.Render/Texture2DMultisampleArray", uri, 2, 0, "Texture2DMultisampleArray");
211 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTextureRectangle, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTextureRectangle", "Qt3D.Render/TextureRectangle", uri, 2, 0, "TextureRectangle");
212 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTextureBuffer, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTextureBuffer", "Qt3D.Render/TextureBuffer", uri, 2, 0, "TextureBuffer");
213 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTextureLoader, Qt3DRender::Render::Quick::Quick3DTextureExtension>("QTextureLoader", "Qt3D.Render/TextureLoader", uri, 2, 0, "TextureLoader");
214 qmlRegisterUncreatableType<Qt3DRender::QAbstractTextureImage>(uri, 2, 0, "QAbstractTextureImage", QStringLiteral("QAbstractTextureImage is abstract"));
215 qmlRegisterType<Qt3DRender::QTextureImage>(uri, 2, 0, "TextureImage");
216 qmlRegisterType<Qt3DRender::QSharedGLTexture>(uri, 2, 13, "SharedGLTexture");
217 qmlRegisterType<Qt3DRender::QShaderImage>(uri, 2, 14, "ShaderImage");
218
219 // Geometry
220 qmlRegisterType<Qt3DRender::QAttribute>(uri, 2, 0, "Attribute");
221 qmlRegisterType<Qt3DRender::QAttribute, 10>(uri, 2, 10, "Attribute");
222 qmlRegisterType<Qt3DRender::QAttribute, 11>(uri, 2, 11, "Attribute");
223 qmlRegisterUncreatableType<Qt3DRender::QBuffer>(uri, 2, 0, "BufferBase", QStringLiteral("Use Quick3DBuffer in QML"));
224 qmlRegisterUncreatableType<Qt3DRender::QBuffer, 9>(uri, 2, 9, "BufferBase", QStringLiteral("Use Quick3DBuffer in QML"));
225 qmlRegisterType<Qt3DRender::Render::Quick::Quick3DBuffer>(uri, 2, 0, "Buffer");
226 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QGeometry, Qt3DRender::Render::Quick::Quick3DGeometry>("QGeometry", "Qt3D.Render/Geometry", uri, 2, 0, "Geometry");
227 qmlRegisterType<Qt3DRender::QGeometryRenderer>(uri, 2, 0, "GeometryRenderer");
228 qmlRegisterType<Qt3DRender::QLevelOfDetail>(uri, 2, 9, "LevelOfDetail");
229 qmlRegisterType<Qt3DRender::QLevelOfDetailSwitch>(uri, 2, 9, "LevelOfDetailSwitch");
230 qRegisterMetaType<Qt3DRender::QLevelOfDetailBoundingSphere>("LevelOfDetailBoundingSphere");
231
232 // Mesh
233 qmlRegisterType<Qt3DRender::QMesh>(uri, 2, 0, "Mesh");
234
235 // Picking
236 qmlRegisterType<Qt3DRender::QObjectPicker>(uri, 2, 0, "ObjectPicker");
237 qmlRegisterType<Qt3DRender::QObjectPicker, 9>(uri, 2, 9, "ObjectPicker");
238 qmlRegisterType<Qt3DRender::QObjectPicker, 13>(uri, 2, 13, "ObjectPicker");
239 qmlRegisterUncreatableType<Qt3DRender::QPickEvent>(uri, 2, 0, "PickEvent", QStringLiteral("Events cannot be created"));
240 qmlRegisterType<Qt3DRender::Render::Quick::Quick3DRayCaster>(uri, 2, 11, "RayCaster");
241 qmlRegisterType<Qt3DRender::Render::Quick::Quick3DScreenRayCaster>(uri, 2, 11, "ScreenRayCaster");
242
243 // Compute Job
244 qmlRegisterType<Qt3DRender::QComputeCommand>(uri, 2, 0, "ComputeCommand");
245 qmlRegisterType<Qt3DRender::QComputeCommand, 13>(uri, 2, 13, "ComputeCommand");
246
247 // Layers
248 qmlRegisterType<Qt3DRender::QLayer>(uri, 2, 0, "Layer");
249 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QLayerFilter, Qt3DRender::Render::Quick::Quick3DLayerFilter>("QLayerFilter", "Qt3D.Render/LayerFilter", uri, 2, 0, "LayerFilter");
250
251 // Lights
252 qmlRegisterUncreatableType<Qt3DRender::QAbstractLight>(uri, 2, 0, "Light", QStringLiteral("Light is an abstract base class"));
253 qmlRegisterType<Qt3DRender::QPointLight>(uri, 2, 0, "PointLight");
254 qmlRegisterType<Qt3DRender::QDirectionalLight>(uri, 2, 0, "DirectionalLight");
255 qmlRegisterType<Qt3DRender::QEnvironmentLight>(uri, 2, 9, "EnvironmentLight");
256 qmlRegisterType<Qt3DRender::QSpotLight>(uri, 2, 0, "SpotLight");
257
258 // FrameGraph
259 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QCameraSelector, Qt3DCore::Quick::Quick3DNode>("QCameraSelector", "Qt3D.Render/CameraSelector", uri, 2, 0, "CameraSelector");
260 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QRenderPassFilter, Qt3DRender::Render::Quick::Quick3DRenderPassFilter>("QRenderPassFilter", "Qt3D.Render/RenderPassFilter", uri, 2, 0, "RenderPassFilter");
261 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QTechniqueFilter, Qt3DRender::Render::Quick::Quick3DTechniqueFilter>("QTechniqueFilter", "Qt3D.Render/TechniqueFilter", uri, 2, 0, "TechniqueFilter");
262 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QViewport, Qt3DRender::Render::Quick::Quick3DViewport>("QViewport", "Qt3D.Render/Viewport", uri, 2, 0, "Viewport");
263 qmlRegisterType<Qt3DRender::QViewport, 9>(uri, 2, 9, "Viewport");
264 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QRenderTargetSelector, Qt3DRender::Render::Quick::Quick3DRenderTargetSelector>("QRenderTargetSelector", "Qt3D.Render/RenderTargetSelector", uri, 2, 0, "RenderTargetSelector");
265 qmlRegisterType<Qt3DRender::QClearBuffers>(uri, 2, 0, "ClearBuffers");
266 qmlRegisterType<Qt3DRender::QFrameGraphNode>(uri, 2, 0, "FrameGraphNode");
267 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QRenderStateSet, Qt3DRender::Render::Quick::Quick3DStateSet>("QRenderStateSet", "Qt3D.Render/RenderStateSet", uri, 2, 0, "RenderStateSet");
268 qmlRegisterType<Qt3DRender::QNoDraw>(uri, 2, 0, "NoDraw");
269 qmlRegisterType<Qt3DRender::QFrustumCulling>(uri, 2, 0, "FrustumCulling");
270 qmlRegisterType<Qt3DRender::QDispatchCompute>(uri, 2, 0, "DispatchCompute");
271 qmlRegisterType<Qt3DRender::QRenderCapture>(uri, 2, 1, "RenderCapture");
272 qmlRegisterType<Qt3DRender::QRenderCapture, 9>(uri, 2, 9, "RenderCapture");
273 qmlRegisterUncreatableType<Qt3DRender::QRenderCaptureReply>(uri, 2, 1, "RenderCaptureReply", QStringLiteral("RenderCaptureReply is only instantiated by RenderCapture"));
274 qmlRegisterType<Qt3DRender::QBufferCapture>(uri, 2, 9, "BufferCapture");
275 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QMemoryBarrier, Qt3DRender::Render::Quick::Quick3DMemoryBarrier>("QMemoryBarrier", "Qt3D.Render/MemoryBarrier", uri, 2, 9, "MemoryBarrier");
276 qmlRegisterType<Qt3DRender::QProximityFilter>(uri, 2, 10, "ProximityFilter");
277 qmlRegisterType<Qt3DRender::QBlitFramebuffer>(uri, 2, 10, "BlitFramebuffer");
278 qmlRegisterType<Qt3DRender::QSetFence>(uri, 2, 13, "SetFence");
279 qmlRegisterType<Qt3DRender::QWaitFence>(uri, 2, 13, "WaitFence");
280 qmlRegisterType<Qt3DRender::QNoPicking>(uri, 2, 14, "NoPicking");
281
282 // RenderTarget
283 qmlRegisterType<Qt3DRender::QRenderTargetOutput>(uri, 2, 0, "RenderTargetOutput");
284 Qt3DRender::Quick::registerExtendedType<Qt3DRender::QRenderTarget, Qt3DRender::Render::Quick::Quick3DRenderTargetOutput>("QRenderTarget", "Qt3D.Render/RenderTarget", uri, 2, 0, "RenderTarget");
285
286 // Render surface selector
287 qmlRegisterType<Qt3DRender::QRenderSurfaceSelector>(uri, 2, 0, "RenderSurfaceSelector");
288
289 // Sorting
290 qmlRegisterType<Qt3DRender::QSortPolicy>(uri, 2, 0, "SortPolicy");
291
292 // RenderStates
293 qmlRegisterUncreatableType<Qt3DRender::QRenderState>(uri, 2, 0, "RenderState", QStringLiteral("QRenderState is a base class"));
294 qmlRegisterType<Qt3DRender::QBlendEquationArguments>(uri, 2, 0, "BlendEquationArguments");
295 qmlRegisterType<Qt3DRender::QBlendEquation>(uri, 2, 0, "BlendEquation");
296 qmlRegisterType<Qt3DRender::QAlphaTest>(uri, 2, 0, "AlphaTest");
297 qmlRegisterType<Qt3DRender::QDepthRange>(uri, 2, 13, "DepthRange");
298 qmlRegisterType<Qt3DRender::QDepthTest>(uri, 2, 0, "DepthTest");
299 qmlRegisterType<Qt3DRender::QMultiSampleAntiAliasing>(uri, 2, 0, "MultiSampleAntiAliasing");
300 qmlRegisterType<Qt3DRender::QNoDepthMask>(uri, 2, 0, "NoDepthMask");
301 qmlRegisterType<Qt3DRender::QCullFace>(uri, 2, 0, "CullFace");
302 qmlRegisterType<Qt3DRender::QFrontFace>(uri, 2, 0, "FrontFace");
303 qmlRegisterUncreatableType<Qt3DRender::QStencilTestArguments>(uri, 2, 0, "StencilTestArguments", QStringLiteral("QStencilTestArguments cannot be instantiated on its own"));
304 qmlRegisterType<Qt3DRender::QStencilTest>(uri, 2, 0, "StencilTest");
305 qmlRegisterType<Qt3DRender::QScissorTest>(uri, 2, 0, "ScissorTest");
306 qmlRegisterType<Qt3DRender::QDithering>(uri, 2, 0, "Dithering");
307 qmlRegisterType<Qt3DRender::QAlphaCoverage>(uri, 2, 0, "AlphaCoverage");
308 qmlRegisterType<Qt3DRender::QPointSize>(uri, 2, 0, "PointSize");
309 qmlRegisterType<Qt3DRender::QPolygonOffset>(uri, 2, 0, "PolygonOffset");
310 qmlRegisterType<Qt3DRender::QColorMask>(uri, 2, 0, "ColorMask");
311 qmlRegisterType<Qt3DRender::QClipPlane>(uri, 2, 0, "ClipPlane");
312 qmlRegisterUncreatableType<Qt3DRender::QStencilOperationArguments>(uri, 2, 0, "StencilOperationArguments", QStringLiteral("StencilOperationArguments cannot be instanciated on its own"));
313 qmlRegisterType<Qt3DRender::QSeamlessCubemap>(uri, 2, 0, "SeamlessCubemap");
314 qmlRegisterType<Qt3DRender::QStencilOperation>(uri, 2, 0, "StencilOperation");
315 qmlRegisterType<Qt3DRender::QStencilMask>(uri, 2, 0, "StencilMask");
316 qmlRegisterType<Qt3DRender::QLineWidth>(uri, 2, 10, "LineWidth");
317 qmlRegisterType<Qt3DRender::QRasterMode>(uri, 2, 13, "RasterMode");
318
319 // Auto-increment the import to stay in sync with ALL future Qt minor versions
320 qmlRegisterModule(uri, 2, QT_VERSION_MINOR);
321}
322
323QT_END_NAMESPACE
324
325
326