summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-26 12:51:54 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-28 09:57:44 +0100
commita2c6c81f5c67390629a313ff7ba985d0967ca1fa (patch)
treee812286604ff3b34fe6678e145590b739de6d72b /src/render
parent4f46ccc4517a52b152d36e7734c2042e06ea8de3 (diff)
parent1c52a489c1eed52107cdde28890ca230424bd85b (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/input/backend/updateaxisactionjob.cpp src/render/renderstates/qalphacoverage.cpp src/render/renderstates/qclipplane.cpp src/render/renderstates/qdithering.cpp src/render/renderstates/qseamlesscubemap.cpp src/render/renderstates/qstenciltest.cpp Change-Id: I5b279d30bbbb06af5e8ee9fc47e9794b78a567f5
Diffstat (limited to 'src/render')
-rw-r--r--src/render/framegraph/qdispatchcompute.cpp42
-rw-r--r--src/render/framegraph/qframegraphnode.cpp12
-rw-r--r--src/render/framegraph/qfrustumculling.cpp33
-rw-r--r--src/render/framegraph/qrendertargetselector.cpp73
-rw-r--r--src/render/frontend/qcomputecommand.cpp82
-rw-r--r--src/render/frontend/qrenderaspect.cpp3
-rw-r--r--src/render/frontend/qrendertarget.cpp49
-rw-r--r--src/render/frontend/qrendertargetoutput.cpp174
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp2
-rw-r--r--src/render/io/objloader.cpp15
-rw-r--r--src/render/jobs/renderviewjobutils.cpp3
-rw-r--r--src/render/renderstates/qalphacoverage.cpp43
-rw-r--r--src/render/renderstates/qalphatest.cpp98
-rw-r--r--src/render/renderstates/qclipplane.cpp48
-rw-r--r--src/render/renderstates/qcolormask.cpp43
-rw-r--r--src/render/renderstates/qcullface.cpp72
-rw-r--r--src/render/renderstates/qdepthtest.cpp89
-rw-r--r--src/render/renderstates/qdithering.cpp33
-rw-r--r--src/render/renderstates/qfrontface.cpp62
-rw-r--r--src/render/renderstates/qmultisampleantialiasing.cpp30
-rw-r--r--src/render/renderstates/qnodepthmask.cpp32
-rw-r--r--src/render/renderstates/qpointsize.cpp24
-rw-r--r--src/render/renderstates/qpolygonoffset.cpp77
-rw-r--r--src/render/renderstates/qrenderstate.cpp24
-rw-r--r--src/render/renderstates/qscissortest.cpp109
-rw-r--r--src/render/renderstates/qseamlesscubemap.cpp32
-rw-r--r--src/render/renderstates/qstencilmask.cpp80
-rw-r--r--src/render/renderstates/qstenciloperation.cpp68
-rw-r--r--src/render/renderstates/qstenciloperationarguments.cpp152
-rw-r--r--src/render/renderstates/qstenciltest.cpp64
-rw-r--r--src/render/renderstates/qstenciltestarguments.cpp134
-rw-r--r--src/render/renderstates/statevariant_p.h8
32 files changed, 1355 insertions, 455 deletions
diff --git a/src/render/framegraph/qdispatchcompute.cpp b/src/render/framegraph/qdispatchcompute.cpp
index abb4d7bdb..ca656c114 100644
--- a/src/render/framegraph/qdispatchcompute.cpp
+++ b/src/render/framegraph/qdispatchcompute.cpp
@@ -44,12 +44,18 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- \class Qt3DRender::QDispatchCompute
- \inmodule Qt3DRender
- \since 5.7
- \ingroup framegraph
+ \class Qt3DRender::QDispatchCompute
+ \inmodule Qt3DRender
+ \since 5.7
+ \ingroup framegraph
+ \brief FrameGraph node to issue work for the compute shader on GPU
- \brief Allows a glDispatchCompute call to be issued to do work in a compute shader on the GPU.
+ A Qt3DRender::QDispatchCompute allows work to be issued for the compute shader to
+ run on the GPU. The workGroupX, workGroupY and workGroupZ properties specify the work group
+ sizes for the compute shader invocation. QComputeCommand components need to be added
+ to entities to instruct Qt3D to select the materials and geometry from the entities
+ for the compute invocation. The work group sizes for the shader invocation will be
+ the maximum of the work group sizes specified in QDispatchCompute and QComputeCommand.
*/
@@ -59,11 +65,33 @@ namespace Qt3DRender {
\instantiates Qt3DRender::QDispatchCompute
\inherits FrameGraphNode
\since 5.7
- \qmlabstract Allows a glDispatchCompute call to be issued to do work in a compute shader on the GPU.
+ \brief FrameGraph node to issue work for the compute shader on GPU
+
+ A DispatchCompute allows work to be issued for the compute shader to run on the GPU.
+ The workGroupX, workGroupY and workGroupZ properties specify the work group sizes for
+ the compute shader invocation. ComputeCommand components need to be added
+ to entities to instruct Qt3D to select the materials and geometry from the entities
+ for the compute invocation. The work group sizes for the shader invocation will be
+ the maximum of the work group sizes specified in DispatchCompute and ComputeCommand.
*/
/*!
- The constructor creates an instance with the specified \a parent.
+ \qmlproperty int DispatchCompute::workGroupX
+ Specifies X workgroup size.
+ */
+
+/*!
+ \qmlproperty int DispatchCompute::workGroupY
+ Specifies Y workgroup size.
+ */
+
+/*!
+ \qmlproperty int DispatchCompute::workGroupZ
+ Specifies Z workgroup size.
+ */
+
+/*!
+ The constructor creates an instance with the specified \a parent.
*/
QDispatchCompute::QDispatchCompute(Qt3DCore::QNode *parent)
: QFrameGraphNode(*new QDispatchComputePrivate(), parent)
diff --git a/src/render/framegraph/qframegraphnode.cpp b/src/render/framegraph/qframegraphnode.cpp
index c60c859ac..36a9f737a 100644
--- a/src/render/framegraph/qframegraphnode.cpp
+++ b/src/render/framegraph/qframegraphnode.cpp
@@ -56,8 +56,10 @@ QFrameGraphNodePrivate::QFrameGraphNodePrivate()
\brief Base class of all FrameGraph configuration nodes.
- This is an abstract class so it cannot be instanced directly
- but rather through one of its subclasses.
+ This class is rarely instanced directly since it doesn't provide
+ any frame graph specific behavior, although it can be convenient
+ to use for grouping other nodes together in dynamic frame graphs.
+ The actual behavior comes from the subclasses.
The subclasses are:
\table
@@ -112,8 +114,10 @@ QFrameGraphNodePrivate::QFrameGraphNodePrivate()
\since 5.5
\brief Base class of all FrameGraph configuration nodes.
- This is an abstract class so it cannot be instanced directly
- but rather through one of its subclasses.
+ This class is rarely instanced directly since it doesn't provide
+ any frame graph specific behavior, although it can be convenient
+ to use for grouping other nodes together in dynamic frame graphs.
+ The actual behavior comes from the subclasses.
The subclasses are:
\table
diff --git a/src/render/framegraph/qfrustumculling.cpp b/src/render/framegraph/qfrustumculling.cpp
index 5ba96926e..1d95892b3 100644
--- a/src/render/framegraph/qfrustumculling.cpp
+++ b/src/render/framegraph/qfrustumculling.cpp
@@ -43,13 +43,20 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- \class Qt3DRender::QFrustumCulling
- \inmodule Qt3DRender
- \since 5.7
- \ingroup framegraph
+ \class Qt3DRender::QFrustumCulling
+ \inmodule Qt3DRender
+ \since 5.7
+ \ingroup framegraph
+ \brief Enable frustum culling for the FrameGraph
+
+ A QFrustumCulling class enables frustum culling of the drawable entities based on
+ the camera view and QGeometry bounds of the entities. If QFrustumCulling is present in
+ the FrameGraph, only the entities whose QGeometry bounds intersect with the camera
+ frustum, i.e. the view of the camera, are drawn. If QFrustumCulling is not present,
+ all drawable entities will be drawn. The camera is selected by a QCameraSelector
+ frame graph node in the current hierarchy. Frustum culling can save a lot of GPU
+ processing time when the rendered scene is complex.
- \brief If present, only tries to draw entities that are in the view of the camera.
- The camera is selected by a QCameraSelector frame graph node in the current hierarchy.
\sa QCameraSelector
*/
@@ -59,13 +66,21 @@ namespace Qt3DRender {
\instantiates Qt3DRender::QFrustumCulling
\inherits FrameGraphNode
\since 5.7
- \qmlabstract If present, only tries to draw entities that are in the view of the camera.
- The camera is selected by a CameraSelector frame graph node in the current hierarchy
+ \brief Enable frustum culling for the FrameGraph
+
+ A FrustumCulling type enables frustum culling of the drawable entities based on
+ the camera view and Geometry bounds of the entities. If FrustumCulling is present in
+ the FrameGraph, only the entities whose Geometry bounds intersect with the camera
+ frustum, i.e. the view of the camera, are drawn. If FrustumCulling is not present,
+ all drawable entities will be drawn. The camera is selected by a CameraSelector
+ frame graph node in the current hierarchy. Frustum culling can save a lot of GPU
+ processing time when the rendered scene is complex.
+
\sa CameraSelector
*/
/*!
- The constructor creates an instance with the specified \a parent.
+ The constructor creates an instance with the specified \a parent.
*/
QFrustumCulling::QFrustumCulling(Qt3DCore::QNode *parent)
: QFrameGraphNode(parent)
diff --git a/src/render/framegraph/qrendertargetselector.cpp b/src/render/framegraph/qrendertargetselector.cpp
index a413bbf56..f129d6e1e 100644
--- a/src/render/framegraph/qrendertargetselector.cpp
+++ b/src/render/framegraph/qrendertargetselector.cpp
@@ -49,23 +49,38 @@ using namespace Qt3DCore;
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QRenderTargetSelector
- * \inmodule Qt3DRender
- * \brief Provides a way of specifying a render target
- * \since 5.7
- *
- * \inherits Qt3DRender::QFrameGraphNode
- *
+ \class Qt3DRender::QRenderTargetSelector
+ \inmodule Qt3DRender
+ \since 5.7
+ \brief Provides a way of specifying a render target
+
+ A Qt3DRender::QRenderTargetSelector is used to select active Qt3DRender::QRenderTarget
+ for the FrameGraph. When QRenderTargetSelector is present in the FrameGraph,
+ the rendering is directed into QTexture objects or draw buffers instead of the surface
+ specified in the Qt3DRender::QRenderSurfaceSelector. A render buffer is automatically
+ generated for an attachment point if drawBuffers contain attachment point that any
+ output in the QRenderTarget do not specify. If the drawBuffers is empty,
+ the renderer will default to using all the outputs in QRenderTarget.
*/
/*!
- * \qmltype RenderTargetSelector
- * \inqmlmodule Qt3D.Render
- * \since 5.7
- * \ingroup
- * \instantiates Qt3DRender::QRenderTargetSelector
- * \brief RenderTargetSelector
- *
+ \qmltype RenderTargetSelector
+ \inqmlmodule Qt3D.Render
+ \since 5.7
+ \instantiates Qt3DRender::QRenderTargetSelector
+ \inherits FrameGraphNode
+ \brief Provides a way of specifying a render target
+
+ A RenderTargetSelector is used to select active RenderTarget
+ for the FrameGraph. When RenderTargetSelector is present in the FrameGraph,
+ the rendering is directed into Texture objects or draw buffers instead of the surface
+ specified in the RenderSurfaceSelector.
+ */
+/*!
+ \qmlproperty list<variant> RenderTargetSelector::drawBuffers
+ Holds the list of draw buffers enabled for the RenderTarget.
+
+ \sa Qt3DRender::QRenderTargetOutput::AttachmentPoint
*/
QRenderTargetSelectorPrivate::QRenderTargetSelectorPrivate()
@@ -75,7 +90,7 @@ QRenderTargetSelectorPrivate::QRenderTargetSelectorPrivate()
}
/*!
- * Constructs QRenderTargetSelector with given \a parent.
+ Constructs QRenderTargetSelector with given \a parent.
*/
QRenderTargetSelector::QRenderTargetSelector(QNode *parent)
: QFrameGraphNode(*new QRenderTargetSelectorPrivate, parent)
@@ -88,13 +103,13 @@ QRenderTargetSelector::~QRenderTargetSelector()
}
/*!
- * \property QRenderTargetSelector::target
- * Specifies the target to be rendered
+ \property QRenderTargetSelector::target
+ Holds the current render target
*/
-/*! \qmlproperty QWindow Qt3D.Render::RenderTargetSelector::target
- *
- * the target to be rendered
+/*! \qmlproperty RenderTarget Qt3D.Render::RenderTargetSelector::target
+
+ Holds the current render target
*/
void QRenderTargetSelector::setTarget(QRenderTarget *target)
{
@@ -124,15 +139,13 @@ QRenderTarget *QRenderTargetSelector::target() const
}
/*!
- * \internal
- * Sets the draw buffers \a buffers to be used. The draw buffers should be
- * matching the Qt3DRender::QRenderTargetOutput::RenderAttachmentType
- * defined in the attachments of the Qt3DRender::QRenderTarget associated to the
- * Qt3DRender::QRenderTargetSelector instance.
- *
- * \note At render time, if no draw buffer has been specified, the renderer will
- * default to using all the attachments' draw buffers.
- *
+ Sets the draw \a buffers to be used. The draw buffers should be
+ matching the Qt3DRender::QRenderTargetOutput::AttachmentPoint
+ defined in the attachments of the Qt3DRender::QRenderTarget associated to the
+ Qt3DRender::QRenderTargetSelector instance.
+
+ \note At render time, if no draw buffer has been specified, the renderer will
+ default to using all the attachments' draw buffers.
*/
void QRenderTargetSelector::setOutputs(const QVector<QRenderTargetOutput::AttachmentPoint> &buffers)
{
@@ -150,7 +163,7 @@ void QRenderTargetSelector::setOutputs(const QVector<QRenderTargetOutput::Attach
}
/*!
- * Returns the list of draw buffers for the current Qt3DRender::QRenderTargetSelector instance.
+ \return the list of draw buffers for the current Qt3DRender::QRenderTargetSelector instance.
*/
QVector<QRenderTargetOutput::AttachmentPoint> QRenderTargetSelector::outputs() const
{
diff --git a/src/render/frontend/qcomputecommand.cpp b/src/render/frontend/qcomputecommand.cpp
index 0bd2f629b..c36e4039c 100644
--- a/src/render/frontend/qcomputecommand.cpp
+++ b/src/render/frontend/qcomputecommand.cpp
@@ -45,10 +45,61 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QComputeCommand
- * \brief The QComputerCommand class
- * \since 5.7
- * \inmodule Qt3DRender
+ \class Qt3DRender::QComputeCommand
+ \since 5.7
+ \inmodule Qt3DRender
+ \brief QComponent to issue work for the compute shader on GPU
+
+ A Qt3DRender::QComputeCommand is used to issue work for the compute shader.
+ The compute shader is specified in the QMaterial component of the same entity the
+ QComputeCommand is added to. The workGroupX, workGroupY and workGroupZ properties
+ specify the work group sizes for the compute shader invocation. Qt3DRender::QDispatchCompute
+ node needs to be present in the FrameGraph to actually issue the commands.
+ */
+
+/*!
+ \qmltype ComputeCommand
+ \since 5.7
+ \inmodule Qt3DRender
+ \inherits Component3D
+ \instantiates Qt3DRender::QComputeCommand
+ \brief Component to issue work for the compute shader on GPU
+
+ A ComputeCommand is used to issue work for the compute shader.
+ The compute shader is specified in the Material component of the same entity the
+ ComputeCommand is added to. The workGroupX, workGroupY and workGroupZ properties
+ specify the work group sizes for the compute shader invocation. DispatchCompute
+ node needs to be present in the FrameGraph to actually issue the commands.
+ */
+
+/*!
+ \qmlproperty int ComputeCommand::workGroupX
+ Specifies X workgroup size.
+ */
+
+/*!
+ \qmlproperty int ComputeCommand::workGroupY
+ Specifies Y workgroup size.
+ */
+
+/*!
+ \qmlproperty int ComputeCommand::workGroupZ
+ Specifies Z workgroup size.
+ */
+
+/*!
+ \property QComputeCommand::workGroupX
+ Specifies X workgroup size.
+ */
+
+/*!
+ \property QComputeCommand::workGroupY
+ Specifies Y workgroup size.
+ */
+
+/*!
+ \property QComputeCommand::workGroupZ
+ Specifies Z workgroup size.
*/
QComputeCommandPrivate::QComputeCommandPrivate()
@@ -60,9 +111,8 @@ QComputeCommandPrivate::QComputeCommandPrivate()
}
/*!
- * The constructor creates a new Qt3DRender::QComputeCommand instance with the
- * specified \a parent.
- * \param parent
+ The constructor creates a new Qt3DRender::QComputeCommand instance with the
+ specified \a parent.
*/
QComputeCommand::QComputeCommand(Qt3DCore::QNode *parent)
: Qt3DCore::QComponent(*new QComputeCommandPrivate, parent)
@@ -74,27 +124,18 @@ QComputeCommand::~QComputeCommand()
{
}
-/*!
- * \return the workgroup size for the first dimension.
- */
int QComputeCommand::workGroupX() const
{
Q_D(const QComputeCommand);
return d->m_workGroupX;
}
-/*!
- * \return the workgroup size for the second dimension.
- */
int QComputeCommand::workGroupY() const
{
Q_D(const QComputeCommand);
return d->m_workGroupY;
}
-/*!
- * \return the workgroup size for the third dimension.
- */
int QComputeCommand::workGroupZ() const
{
Q_D(const QComputeCommand);
@@ -102,8 +143,7 @@ int QComputeCommand::workGroupZ() const
}
/*!
- * Sets the workgroup for the first dimension to \a workGroupX.
- * \param workGroupX
+ Sets the workgroup for the first dimension to \a workGroupX.
*/
void QComputeCommand::setWorkGroupX(int workGroupX)
{
@@ -115,8 +155,7 @@ void QComputeCommand::setWorkGroupX(int workGroupX)
}
/*!
- * Sets the workgroup for the second dimension to \a workGroupY.
- * \param workGroupY
+ Sets the workgroup for the second dimension to \a workGroupY.
*/
void QComputeCommand::setWorkGroupY(int workGroupY)
{
@@ -128,8 +167,7 @@ void QComputeCommand::setWorkGroupY(int workGroupY)
}
/*!
- * Sets the workgroup for the third dimension to \a workGroupZ.
- * \param workGroupZ
+ Sets the workgroup for the third dimension to \a workGroupZ.
*/
void QComputeCommand::setWorkGroupZ(int workGroupZ)
{
diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp
index c25de9654..1952a55c2 100644
--- a/src/render/frontend/qrenderaspect.cpp
+++ b/src/render/frontend/qrenderaspect.cpp
@@ -211,6 +211,7 @@ void QRenderAspectPrivate::registerBackendTypes()
q->registerBackendType<QTechnique>(QSharedPointer<Render::TechniqueFunctor>::create(m_renderer, m_nodeManagers));
// Framegraph
+ q->registerBackendType<QFrameGraphNode>(QSharedPointer<Render::FrameGraphNodeFunctor<Render::FrameGraphNode, QFrameGraphNode> >::create(m_renderer, m_nodeManagers->frameGraphManager()));
q->registerBackendType<QCameraSelector>(QSharedPointer<Render::FrameGraphNodeFunctor<Render::CameraSelector, QCameraSelector> >::create(m_renderer, m_nodeManagers->frameGraphManager()));
q->registerBackendType<QClearBuffers>(QSharedPointer<Render::FrameGraphNodeFunctor<Render::ClearBuffers, QClearBuffers> >::create(m_renderer, m_nodeManagers->frameGraphManager()));
q->registerBackendType<QDispatchCompute>(QSharedPointer<Render::FrameGraphNodeFunctor<Render::DispatchCompute, QDispatchCompute> >::create(m_renderer, m_nodeManagers->frameGraphManager()));
@@ -360,7 +361,7 @@ QVector<Qt3DCore::QAspectJobPtr> QRenderAspect::jobsToExecute(qint64 time)
// QChangeArbiter::syncChanges() that happens just before the render aspect is
// asked for jobs to execute (this function). If that is the case, the RenderSettings will
// be null and we should not generate any jobs.
- if (d->m_renderer != nullptr && d->m_renderer->isRunning() && d->m_renderer->settings()) {
+ if (d->m_renderer->isRunning() && d->m_renderer->settings()) {
// don't spawn any jobs, if the renderer decides to skip this frame
if (!d->m_renderer->shouldRender()) {
d->m_renderer->skipNextFrame();
diff --git a/src/render/frontend/qrendertarget.cpp b/src/render/frontend/qrendertarget.cpp
index 44414e904..bdf8b5fa1 100644
--- a/src/render/frontend/qrendertarget.cpp
+++ b/src/render/frontend/qrendertarget.cpp
@@ -51,13 +51,40 @@ using namespace Qt3DCore;
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QRenderTarget
- * \brief The QRenderTarget class encapsulates a target (usually a frame buffer
- * object) which the renderer can render into.
- * \since 5.7
- * \inmodule Qt3DRender
+ \class Qt3DRender::QRenderTarget
+ \brief The QRenderTarget class encapsulates a target (usually a frame buffer
+ object) which the renderer can render into.
+ \since 5.7
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QRenderTarget comprises of Qt3DRender::QRenderTargetOutput objects,
+ which specify the the buffers the render target is rendering to. The user can
+ specify MRT(Multiple Render Targets) by attaching multiple textures to different
+ attachment points. The results are undefined if the user tries to attach multiple
+ textures to the same attachment point. At render time, only the draw buffers specified
+ in the Qt3DRender::QRenderTargetSelector are used.
+
+ */
+/*!
+ \qmltype RenderTarget
+ \brief The RenderTarget class encapsulates a target (usually a frame buffer
+ object) which the renderer can render into.
+ \since 5.7
+ \inmodule Qt3D.Render
+ \instantiates Qt3DRender::QRenderTarget
+
+ A RenderTarget comprises of RenderTargetOutput objects, which specify the the buffers
+ the render target is rendering to. The user can specify MRT(Multiple Render Targets)
+ by attaching multiple textures to different attachment points. The results are undefined
+ if the user tries to attach multiple textures to the same attachment point. At render
+ time, only the draw buffers specified in the RenderTargetSelector are used.
*/
+/*!
+ \qmlproperty list<RenderTargetOutput> RenderTarget::attachments
+ Holds the attachments for the RenderTarget.
+*/
+
/*! \internal */
QRenderTargetPrivate::QRenderTargetPrivate()
: QComponentPrivate()
@@ -65,8 +92,8 @@ QRenderTargetPrivate::QRenderTargetPrivate()
}
/*!
- * The constructor creates a new QRenderTarget::QRenderTarget instance with
- * the specified \a parent.
+ The constructor creates a new QRenderTarget::QRenderTarget instance with
+ the specified \a parent.
*/
QRenderTarget::QRenderTarget(QNode *parent)
: QComponent(*new QRenderTargetPrivate, parent)
@@ -85,8 +112,7 @@ QRenderTarget::QRenderTarget(QRenderTargetPrivate &dd, QNode *parent)
}
/*!
- * Adds a chosen output via \a output.
- * \param output
+ Adds a chosen output via \a output.
*/
void QRenderTarget::addOutput(QRenderTargetOutput *output)
{
@@ -109,8 +135,7 @@ void QRenderTarget::addOutput(QRenderTargetOutput *output)
}
/*!
- * Removes a chosen output via \a output.
- * \param output
+ Removes a chosen output via \a output.
*/
void QRenderTarget::removeOutput(QRenderTargetOutput *output)
{
@@ -127,7 +152,7 @@ void QRenderTarget::removeOutput(QRenderTargetOutput *output)
}
/*!
- * \return the chosen outputs.
+ \return the chosen outputs.
*/
QVector<QRenderTargetOutput *> QRenderTarget::outputs() const
{
diff --git a/src/render/frontend/qrendertargetoutput.cpp b/src/render/frontend/qrendertargetoutput.cpp
index 55b788a23..6d65ec08e 100644
--- a/src/render/frontend/qrendertargetoutput.cpp
+++ b/src/render/frontend/qrendertargetoutput.cpp
@@ -47,13 +47,141 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QRenderTargetOutput
- * \brief The QRenderTargetOutput class allows the specification of an attachment
- * of a render target (whether it is a color texture, a depth texture, etc... ).
- * \since 5.7
- * \inmodule Qt3DRender
+ \class Qt3DRender::QRenderTargetOutput
+ \brief The QRenderTargetOutput class allows the specification of an attachment
+ of a render target (whether it is a color texture, a depth texture, etc... ).
+ \since 5.7
+ \inmodule Qt3DRender
+
+ A QRenderTargetOutput specifies the attachment point and parameters for texture
+ that is attached to render target. In addition to the attachment point, texture
+ miplevel, layer and cubemap face can be specified. The texture attached to the
+ QRenderTargetOutput must be compatible with the given parameters.
+ */
+
+/*!
+ \qmltype RenderTargetOutput
+ \brief The RenderTargetOutput type allows the specification of an attachment
+ of a render target (whether it is a color texture, a depth texture, etc... ).
+ \since 5.7
+ \inmodule Qt3D.Render
+ \inherits Node
+ \instantiates Qt3DRender::QRenderTargetOutput
+
+ A RenderTargetOutput specifies the attachment point and parameters for texture
+ that is attached to render target. In addition to the attachment point, texture
+ miplevel, layer and cubemap face can be specified. The texture attached to the
+ RenderTargetOutput must be compatible with the given parameters.
*/
+/*!
+ \enum QRenderTargetOutput::AttachmentPoint
+
+ This enumeration specifies the values for the attachment point.
+
+ \value Color0 Color attachment point at index 0
+ \value Color1 Color attachment point at index 1
+ \value Color2 Color attachment point at index 2
+ \value Color3 Color attachment point at index 3
+ \value Color4 Color attachment point at index 4
+ \value Color5 Color attachment point at index 5
+ \value Color6 Color attachment point at index 6
+ \value Color7 Color attachment point at index 7
+ \value Color8 Color attachment point at index 8
+ \value Color9 Color attachment point at index 9
+ \value Color10 Color attachment point at index 10
+ \value Color11 Color attachment point at index 11
+ \value Color12 Color attachment point at index 12
+ \value Color13 Color attachment point at index 13
+ \value Color14 Color attachment point at index 14
+ \value Color15 Color attachment point at index 15
+ \value Depth Depth attachment point
+ \value Stencil Stencil attachment point
+ \value DepthStencil DepthStencil attachment point
+*/
+
+/*!
+ \qmlproperty enumeration RenderTargetOutput::attachmentPoint
+ Holds the attachment point of the RenderTargetOutput.
+ \list
+ \li RenderTargetOutput.Color0
+ \li RenderTargetOutput.Color1
+ \li RenderTargetOutput.Color2
+ \li RenderTargetOutput.Color3
+ \li RenderTargetOutput.Color4
+ \li RenderTargetOutput.Color5
+ \li RenderTargetOutput.Color6
+ \li RenderTargetOutput.Color7
+ \li RenderTargetOutput.Color8
+ \li RenderTargetOutput.Color9
+ \li RenderTargetOutput.Color10
+ \li RenderTargetOutput.Color11
+ \li RenderTargetOutput.Color12
+ \li RenderTargetOutput.Color13
+ \li RenderTargetOutput.Color14
+ \li RenderTargetOutput.Color15
+ \li RenderTargetOutput.Depth
+ \li RenderTargetOutput.Stencil
+ \li RenderTargetOutput.DepthStencil
+ \endlist
+
+ \sa Qt3DRender::QRenderTargetOutput::AttachmentPoint
+*/
+
+/*!
+ \qmlproperty Texture RenderTargetOutput::texture
+ Holds the texture attached to the attachment point.
+*/
+
+/*!
+ \qmlproperty int RenderTargetOutput::mipLevel
+ Holds the miplevel of the attached texture the rendering is directed to.
+*/
+
+/*!
+ \qmlproperty int RenderTargetOutput::layer
+ Holds the layer of the attached texture the rendering is directed to.
+*/
+
+/*!
+ \qmlproperty enumeration RenderTargetOutput::face
+ Holds the face of the attached cubemap texture the rendering is directed to.
+ \list
+ \li Texture.CubeMapPositiveX
+ \li Texture.CubeMapNegativeX
+ \li Texture.CubeMapPositiveY
+ \li Texture.CubeMapNegativeY
+ \li Texture.CubeMapPositiveZ
+ \li Texture.CubeMapNegativeZ
+ \endlist
+ \sa Qt3DRender::QAbstractTexture::CubeMapFace
+*/
+
+/*!
+ \property QRenderTargetOutput::attachmentPoint
+ Holds the attachment point of the QRenderTargetOutput.
+*/
+
+/*!
+ \property QRenderTargetOutput::texture
+ Holds the texture attached to the attachment point.
+*/
+
+/*!
+ \property QRenderTargetOutput::mipLevel
+ Holds the miplevel of the attached texture the rendering is directed to.
+*/
+
+/*!
+ \property QRenderTargetOutput::layer
+ Holds the layer of the attached texture the rendering is directed to.
+*/
+
+/*!
+ \property QRenderTargetOutput::face
+ Holds the face of the attached cubemap texture the rendering is directed to.
+*/
+
/*! \internal */
QRenderTargetOutputPrivate::QRenderTargetOutputPrivate()
: QNodePrivate()
@@ -66,9 +194,8 @@ QRenderTargetOutputPrivate::QRenderTargetOutputPrivate()
}
/*!
- * The constructor creates a new QRenderTargetOutput::QRenderTargetOutput instance
- * with the specified \a parent.
- * \param parent
+ The constructor creates a new QRenderTargetOutput::QRenderTargetOutput instance
+ with the specified \a parent.
*/
QRenderTargetOutput::QRenderTargetOutput(QNode *parent)
: QNode(*new QRenderTargetOutputPrivate, parent)
@@ -86,10 +213,6 @@ QRenderTargetOutput::QRenderTargetOutput(QRenderTargetOutputPrivate &dd, QNode *
{
}
-/*!
- * Sets the attachment point to \a attachmentPoint.
- * \param attachmentPoint
- */
void QRenderTargetOutput::setAttachmentPoint(QRenderTargetOutput::AttachmentPoint attachmentPoint)
{
Q_D(QRenderTargetOutput);
@@ -99,9 +222,6 @@ void QRenderTargetOutput::setAttachmentPoint(QRenderTargetOutput::AttachmentPoin
}
}
-/*!
- * \return the current attachment point.
- */
QRenderTargetOutput::AttachmentPoint QRenderTargetOutput::attachmentPoint() const
{
Q_D(const QRenderTargetOutput);
@@ -130,19 +250,12 @@ void QRenderTargetOutput::setTexture(QAbstractTexture *texture)
}
}
-/*!
- * \return the current texture.
- */
QAbstractTexture *QRenderTargetOutput::texture() const
{
Q_D(const QRenderTargetOutput);
return d->m_texture;
}
-/*!
- * Sets the required mip level to \a level.
- * \param level
- */
void QRenderTargetOutput::setMipLevel(int level)
{
Q_D(QRenderTargetOutput);
@@ -152,19 +265,12 @@ void QRenderTargetOutput::setMipLevel(int level)
}
}
-/*!
- * \return the current mip level.
- */
int QRenderTargetOutput::mipLevel() const
{
Q_D(const QRenderTargetOutput);
return d->m_mipLevel;
}
-/*!
- * Sets the required layer to \a layer.
- * \param layer
- */
void QRenderTargetOutput::setLayer(int layer)
{
Q_D(QRenderTargetOutput);
@@ -174,19 +280,12 @@ void QRenderTargetOutput::setLayer(int layer)
}
}
-/*!
- * \return the current layer.
- */
int QRenderTargetOutput::layer() const
{
Q_D(const QRenderTargetOutput);
return d->m_layer;
}
-/*!
- * Sets the required cubemap face to \a face.
- * \param face
- */
void QRenderTargetOutput::setFace(QAbstractTexture::CubeMapFace face)
{
Q_D(QRenderTargetOutput);
@@ -196,9 +295,6 @@ void QRenderTargetOutput::setFace(QAbstractTexture::CubeMapFace face)
}
}
-/*!
- * \return the current cubemap face.
- */
QAbstractTexture::CubeMapFace QRenderTargetOutput::face() const
{
Q_D(const QRenderTargetOutput);
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index 2713de85b..8c0803a79 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -1334,7 +1334,7 @@ void GraphicsContext::specifyAttribute(const Attribute *attribute, Buffer *buffe
VAOVertexAttribute attr;
attr.bufferHandle = glBufferHandle;
attr.bufferType = bufferType;
- attr.location = (location >= 0 ? location + i : location);
+ attr.location = location + i;
attr.dataType = attributeDataType;
attr.byteOffset = attribute->byteOffset() + (i * attrCount * typeSize);
attr.vertexSize = attribute->vertexSize() / attrCount;
diff --git a/src/render/io/objloader.cpp b/src/render/io/objloader.cpp
index d9610172f..686a9d5f0 100644
--- a/src/render/io/objloader.cpp
+++ b/src/render/io/objloader.cpp
@@ -60,10 +60,18 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+struct Entry
+{
+ int start;
+ int size;
+};
+QT3D_DECLARE_TYPEINFO(Qt3DRender, Entry, Q_PRIMITIVE_TYPE)
+
/*
* A helper class to split a QByteArray and access its sections without
* additional memory allocations.
*/
+
class ByteArraySplitter
{
public:
@@ -118,17 +126,10 @@ public:
return ByteArraySplitter(m_input + m_entries[index].start, m_input + m_entries[index].start + m_entries[index].size, delimiter, splitBehavior);
}
- struct Entry
- {
- int start;
- int size;
- };
-
private:
QVarLengthArray<Entry, 16> m_entries;
const char *m_input;
};
-QT3D_DECLARE_TYPEINFO(Qt3DRender, ByteArraySplitter::Entry, Q_PRIMITIVE_TYPE)
inline uint qHash(const FaceIndices &faceIndices)
{
diff --git a/src/render/jobs/renderviewjobutils.cpp b/src/render/jobs/renderviewjobutils.cpp
index 5141bea28..d6dcd7f30 100644
--- a/src/render/jobs/renderviewjobutils.cpp
+++ b/src/render/jobs/renderviewjobutils.cpp
@@ -92,6 +92,9 @@ void setRenderViewConfigFromFrameGraphLeafNode(RenderView *rv, const FrameGraphN
FrameGraphNode::FrameGraphNodeType type = node->nodeType();
if (node->isEnabled())
switch (type) {
+ case FrameGraphNode::InvalidNodeType:
+ // A base FrameGraphNode, can be used for grouping purposes
+ break;
case FrameGraphNode::CameraSelector:
// Can be set only once and we take camera nearest to the leaf node
if (!rv->renderCameraLens()) {
diff --git a/src/render/renderstates/qalphacoverage.cpp b/src/render/renderstates/qalphacoverage.cpp
index 7d68160d9..428454040 100644
--- a/src/render/renderstates/qalphacoverage.cpp
+++ b/src/render/renderstates/qalphacoverage.cpp
@@ -46,14 +46,41 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QAlphaCoverage
- * \brief A QAlphaCoverage class
- * \inmodule Qt3DRender
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QAlphaCoverage
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+ \brief Enable alpha-to-coverage multisampling mode
+
+ A Qt3DRender::QAlphaCoverage class enables alpha-to-coverage multisampling mode.
+ When enabled, the fragment alpha value is used as a coverage for the sample
+ and combined with fragment coverage value. Qt3DRender::QAlphaCoverage does
+ nothing if multisampling is disabled. Alpha-to-coverage is most useful when
+ order independent blending is required, for example when rendering leaves,
+ grass and other rich vegetation.
+
+ \sa Qt3DRender::QMultiSampleAntiAliasing
+ */
+
+/*!
+ \qmltype AlphaCoverage
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QAlphaCoverage
+ \inherits RenderState
+ \brief Enable alpha-to-coverage multisampling mode
+
+ An AlphaCoverage type enables alpha-to-coverage multisampling mode.
+ When enabled, the fragment alpha value is used as a coverage for the sample
+ and combined with fragment coverage value. AlphaCoverage does nothing if
+ multisampling is disabled. Alpha-to-coverage is most useful when
+ order independent blending is required, for example when rendering leaves,
+ grass and other rich vegetation.
+
+ \sa MultiSampleAntiAliasing
*/
-/*! \internal */
class QAlphaCoveragePrivate : public QRenderStatePrivate
{
public :
@@ -65,8 +92,8 @@ public :
};
/*!
- * The constructor creates a new QAlphaCoverage::QAlphaCoverage instance
- * with the specified \a parent.
+ The constructor creates a new QAlphaCoverage::QAlphaCoverage instance
+ with the specified \a parent.
*/
QAlphaCoverage::QAlphaCoverage(QNode *parent)
: QRenderState(*new QAlphaCoveragePrivate, parent)
diff --git a/src/render/renderstates/qalphatest.cpp b/src/render/renderstates/qalphatest.cpp
index 2341c1039..81227d499 100644
--- a/src/render/renderstates/qalphatest.cpp
+++ b/src/render/renderstates/qalphatest.cpp
@@ -38,17 +38,6 @@
**
****************************************************************************/
-/*!
- * \class QAlphaTest
- * \brief The QAlphaTest class is an OpenGL helper.
- * \since 5.7
- * \ingroup renderstates
- *
- * As the OpenGL documentation explains; The alpha test discards a fragment
- * conditional on the outcome of a comparison between the incoming fragment's
- * alpha value and a constant value.
- */
-
#include "qalphatest.h"
#include "qalphatest_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -57,6 +46,80 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
+/*!
+ \class Qt3DRender::QAlphaTest
+ \brief The QAlphaTest class specify alpha reference test
+ \since 5.7
+ \inmodule Qt3DRender
+ \ingroup renderstates
+
+ As the OpenGL documentation explains; The alpha test discards a fragment
+ conditional on the outcome of a comparison between the incoming fragment's
+ alpha value and a constant reference value.
+ */
+
+/*!
+ \qmltype AlphaTest
+ \brief The AlphaTest class specify alpha reference test
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QAlphaTest
+ \ingroup renderstates
+
+ As the OpenGL documentation explains; The alpha test discards a fragment
+ conditional on the outcome of a comparison between the incoming fragment's
+ alpha value and a constant reference value.
+ */
+
+/*!
+ \enum Qt3DRender::QAlphaTest::AlphaFunction
+
+ Enumeration for the alpha function values
+ \value Never Never pass alpha test
+ \value Always Always pass alpha test
+ \value Less Pass alpha test if fragment alpha is less than reference value
+ \value LessOrEqual Pass alpha test if fragment alpha is less than or equal to reference value
+ \value Equal Pass alpha test if fragment alpha is equal to reference value
+ \value GreaterOrEqual Pass alpha test if fragment alpha is greater than or equal to reference value
+ \value Greater Pass alpha test if fragment alpha is greater than reference value
+ \value NotEqual Pass alpha test if fragment alpha is not equal to reference value
+*/
+
+/*!
+ \qmlproperty enumeration AlphaTest::alphaFunction
+ Holds the alpha function used by the alpha test. Default is AlphaTest.Never.
+ \list
+ \li AlphaTest.Never
+ \li AlphaTest.Always
+ \li AlphaTest.Less
+ \li AlphaTest.LessOrEqual
+ \li AlphaTest.Equal
+ \li AlphaTest.GreaterOrEqual
+ \li AlphaTest.Greater
+ \li AlphaTest.NotEqual
+ \endlist
+ \sa Qt3DRender::QAlphaTest::AlphaFunction
+*/
+
+/*!
+ \qmlproperty real AlphaTest::referenceValue
+ Holds the reference value used by the alpha test. Default is 0.0.
+ When set, the value is clamped between 0 and 1.
+*/
+
+/*!
+ \property QAlphaTest::alphaFunction
+ Holds the alpha function used by the alpha test. Default is Never.
+*/
+
+/*!
+ \property QAlphaTest::referenceValue
+ Holds the reference value used by the alpha test. Default is 0.0.
+ When set, the value is clamped between 0 and 1.
+*/
+
+
QAlphaTest::QAlphaTest(QNode *parent)
: QRenderState(*new QAlphaTestPrivate, parent)
{
@@ -67,19 +130,12 @@ QAlphaTest::~QAlphaTest()
{
}
-/*!
- * \return the current alpha test function.
- */
QAlphaTest::AlphaFunction QAlphaTest::alphaFunction() const
{
Q_D(const QAlphaTest);
return d->m_alphaFunction;
}
-/*!
- * Sets the alpha test function to \a alphaFunction.
- * \param alphaFunction
- */
void QAlphaTest::setAlphaFunction(QAlphaTest::AlphaFunction alphaFunction)
{
Q_D(QAlphaTest);
@@ -89,18 +145,12 @@ void QAlphaTest::setAlphaFunction(QAlphaTest::AlphaFunction alphaFunction)
}
}
-/*!
- * \return a float value between 0 and 1.
- */
float QAlphaTest::referenceValue() const
{
Q_D(const QAlphaTest);
return d->m_referenceValue;
}
-/*!
- * Sets the reference value which is clamped between 0 and 1 to \a referenceValue.
- */
void QAlphaTest::setReferenceValue(float referenceValue)
{
Q_D(QAlphaTest);
diff --git a/src/render/renderstates/qclipplane.cpp b/src/render/renderstates/qclipplane.cpp
index 197a0c5a3..19053c147 100644
--- a/src/render/renderstates/qclipplane.cpp
+++ b/src/render/renderstates/qclipplane.cpp
@@ -55,7 +55,8 @@ namespace Qt3DRender {
By default, OpenGL supports up to 8 additional clipping planes.
Qt3DCore::QClipPlane allows to enable one of these additional planes. These
planes can then be manipulated in the shaders using gl_ClipDistance[i]
- where i varies between 0 and 8.
+ where i varies between 0 and 7. The underlying implementation may support more
+ than 8 clip planes, but it is not guaranteed.
*/
/*!
@@ -70,9 +71,44 @@ namespace Qt3DRender {
By default, OpenGL supports up to 8 additional clipping planes. ClipPlane
allows to enable one of these additional planes. These planes can then be
manipulated in the shaders using gl_ClipDistance[i] where i varies between
- 0 and 8.
+ 0 and 7. The underlying implementation may support more than 8 clip planes,
+ but it is not guaranteed.
*/
+/*!
+ \qmlproperty int ClipPlane::planeIndex
+ Holds the index of the plane.
+ \note Usually between 0-7.
+*/
+
+/*!
+ \qmlproperty vector3d ClipPlane::normal
+ Holds the normal of the plane.
+*/
+
+/*!
+ \qmlproperty real ClipPlane::distance
+ Holds the distance of the plane from the world origin.
+*/
+
+
+/*!
+ \property QClipPlane::planeIndex
+ Holds the index of the plane.
+ \note Usually between 0-7.
+*/
+
+/*!
+ \property QClipPlane::normal
+ Holds the normal of the plane.
+*/
+
+/*!
+ \property QClipPlane::distance
+ Holds the distance of the plane from the world origin.
+*/
+
+
QClipPlane::QClipPlane(QNode *parent)
: QRenderState(*new QClipPlanePrivate(), parent)
{
@@ -83,10 +119,6 @@ QClipPlane::~QClipPlane()
{
}
-/*!
- * Returns the index of the clip plane.
- * \note usually between 0-7
- */
int QClipPlane::planeIndex() const
{
Q_D(const QClipPlane);
@@ -105,10 +137,6 @@ float QClipPlane::distance() const
return d->m_distance;
}
-/*!
- * Sets the index of the clip plane to \a planeIndex
- * \note above 7, support is not garanteed
- */
void QClipPlane::setPlaneIndex(int planeIndex)
{
Q_D(QClipPlane);
diff --git a/src/render/renderstates/qcolormask.cpp b/src/render/renderstates/qcolormask.cpp
index 71819db94..fde09d7b0 100644
--- a/src/render/renderstates/qcolormask.cpp
+++ b/src/render/renderstates/qcolormask.cpp
@@ -48,7 +48,22 @@ namespace Qt3DRender {
/*!
\class Qt3DRender::QColorMask
\inmodule Qt3DRender
+ \since 5.7
+ \brief Allows specifying which color components should be written to the
+ currently bound frame buffer.
+ By default, the property for each color component (red, green, blue, alpha)
+ is set to \c true which means they will be written to the frame buffer.
+ Setting any of the color component to \c false will prevent it from being
+ written into the frame buffer.
+ */
+
+/*!
+ \qmltype ColorMask
+ \inqmlmodule Qt3D.Render
+ \since 5.7
+ \inherits RenderState
+ \instantiates Qt3DRender::QColorMask
\brief Allows specifying which color components should be written to the
currently bound frame buffer.
@@ -58,6 +73,26 @@ namespace Qt3DRender {
written into the frame buffer.
*/
+/*!
+ \qmlproperty bool ColorMask::redMasked
+ Holds whether red color component should be written to the frame buffer.
+*/
+
+/*!
+ \qmlproperty bool ColorMask::greenMasked
+ Holds whether green color component should be written to the frame buffer.
+*/
+
+/*!
+ \qmlproperty bool ColorMask::blueMasked
+ Holds whether blue color component should be written to the frame buffer.
+*/
+
+/*!
+ \qmlproperty bool ColorMask::alphaMasked
+ Holds whether alpha component should be written to the frame buffer.
+*/
+
/*!
Constructs a new Qt3DCore::QColorMask instance with \a parent as parent.
@@ -97,7 +132,7 @@ bool QColorMask::isAlphaMasked() const
}
/*!
- \property Qt3DRender::QColorMask::red
+ \property QColorMask::redMasked
Holds whether the red color component should be written to the frame buffer.
*/
void QColorMask::setRedMasked(bool redMasked)
@@ -110,7 +145,7 @@ void QColorMask::setRedMasked(bool redMasked)
}
/*!
- \property Qt3DRender::QColorMask::green
+ \property QColorMask::greenMasked
Holds whether the green color component should be written to the frame buffer.
*/
void QColorMask::setGreenMasked(bool greenMasked)
@@ -123,7 +158,7 @@ void QColorMask::setGreenMasked(bool greenMasked)
}
/*!
- \property Qt3DRender::QColorMask::blue
+ \property QColorMask::blueMasked
Holds whether the blue color component should be written to the frame buffer.
*/
void QColorMask::setBlueMasked(bool blueMasked)
@@ -136,7 +171,7 @@ void QColorMask::setBlueMasked(bool blueMasked)
}
/*!
- \property Qt3DRender::QColorMask::alphaMasked
+ \property QColorMask::alphaMasked
Holds whether the alphaMasked component should be written to the frame buffer.
*/
void QColorMask::setAlphaMasked(bool alphaMasked)
diff --git a/src/render/renderstates/qcullface.cpp b/src/render/renderstates/qcullface.cpp
index 2b8a7f8e0..e96346287 100644
--- a/src/render/renderstates/qcullface.cpp
+++ b/src/render/renderstates/qcullface.cpp
@@ -38,18 +38,7 @@
**
****************************************************************************/
-/*!
- * \class QCullFace
- * \brief The QCullFace class specifies whether front or back face culling
- * are enabled
- * \since 5.7
- * \ingroup renderstates
- *
- * QCullFace sets whether the front or back facets are culled.
- * Facets include triangles, quadrilaterals, polygons and rectangles.
- *
- * \sa QFrontFace
- */
+
#include "qcullface.h"
#include "qcullface_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -59,7 +48,57 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * Constructs a new QCullFace::QCullFace instance with \a parent as parent.
+ \class Qt3DRender::QCullFace
+ \brief The QCullFace class specifies whether front or back face culling
+ are enabled
+ \since 5.7
+ \inmodule Qt3DRender
+ \ingroup renderstates
+
+ QCullFace sets whether the front or back facets are culled.
+ Facets include triangles, quadrilaterals, polygons and rectangles.
+
+ \sa QFrontFace
+ */
+
+/*!
+ \qmltype CullFace
+ \brief The CullFace type specifies whether front or back face culling
+ are enabled
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QCullFace
+ \inherits RenderState
+ \ingroup renderstates
+
+ CullFace sets whether the front or back facets are culled.
+ Facets include triangles, quadrilaterals, polygons and rectangles.
+
+ \sa FrontFace
+ */
+
+/*!
+ \enum Qt3DRender::QCullFace::CullingMode
+
+ This enumeration specifies values for the culling mode.
+ \value NoCulling culling is disabled
+ \value Front Culling is enabled for front facing polygons
+ \value Back Culling is enabled for back facing polygons
+ \value FrontAndBack Culling is enabled for all polygons, points and lines are drawn.
+*/
+
+/*!
+ \qmlproperty enumeration CullFace::mode
+ Holds the culling mode used by CullFace. Default is set to QCullFace.Back.
+*/
+
+/*!
+ \property QCullFace::mode
+ Holds the culling mode used by QCullFace. Default is set to QCullFace.Back.
+*/
+
+/*!
+ Constructs a new QCullFace::QCullFace instance with \a parent as parent.
*/
QCullFace::QCullFace(QNode *parent)
: QRenderState(*new QCullFacePrivate, parent)
@@ -71,19 +110,12 @@ QCullFace::~QCullFace()
{
}
-/*!
- * \return which culling mode is currently enabled.
- */
QCullFace::CullingMode QCullFace::mode() const
{
Q_D(const QCullFace);
return d->m_mode;
}
-/*!
- * Sets which faces to cull to \a mode. Default is set to back.
- * \param mode
- */
void QCullFace::setMode(QCullFace::CullingMode mode)
{
Q_D(QCullFace);
diff --git a/src/render/renderstates/qdepthtest.cpp b/src/render/renderstates/qdepthtest.cpp
index c2299f810..7e67ba5ba 100644
--- a/src/render/renderstates/qdepthtest.cpp
+++ b/src/render/renderstates/qdepthtest.cpp
@@ -38,14 +38,6 @@
**
****************************************************************************/
-/*!
- * \class QDepthTest
- * \brief The QDepthTest class tests the fragment shader's depth value against
- * the depth of a sample being written to.
- * \since 5.7
- * \ingroup renderstates
- *
- */
#include "qdepthtest.h"
#include "qdepthtest_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -55,7 +47,79 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QDepthTest::QDepthTest instance with the specified \a parent.
+ \class Qt3DRender::QDepthTest
+ \brief The QDepthTest class tests the fragment shader's depth value against
+ the depth of a sample being written to.
+ \since 5.7
+ \inmodule Qt3DRender
+ \ingroup renderstates
+
+ A QDepthTest class is used to enable depth testing with a given depth test function.
+ The depth test enables writing fragment color values when the depth test passes, and
+ reject fragments which fail the test. The depth test uses the depth function to
+ test the fragments depth value to the value against z-buffer. If the underlying surface
+ does not have z-buffer, then QDepthTest does nothing.
+
+ \sa QAlphaTest, QStencilTest
+ */
+
+/*!
+ \qmltype DepthTest
+ \brief The DepthTest type tests the fragment shader's depth value against
+ the depth of a sample being written to.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QDepthTest
+ \ingroup renderstates
+
+ A DepthTest type is used to enable depth testing with a given depth test function.
+ The depth test enables writing fragment color values when the depth test passes, and
+ reject fragments which fail the test. The depth test uses the depth function to
+ test the fragments depth value to the value against z-buffer. If the underlying surface
+ does not have z-buffer, the DepthTest does nothing.
+
+ \sa AlphaTest, StencilTest
+ */
+
+/*!
+ \enum Qt3DRender::QDepthTest::DepthFunction
+
+ Enumeration for the depth function values
+ \value Never Never pass depth test
+ \value Always Always pass depth test
+ \value Less Pass depth test if fragment depth is less than z-buffer value
+ \value LessOrEqual Pass depth test if fragment depth is less than or equal to z-buffer value
+ \value Equal Pass depth test if fragment depth is equal to z-buffer value
+ \value GreaterOrEqual Pass depth test if fragment depth is greater than or equal to z-buffer value
+ \value Greater Pass depth test if fragment depth is greater than z-buffer value
+ \value NotEqual Pass depth test if fragment depth is not equal to z-buffer value
+*/
+
+/*!
+ \qmlproperty enumeration DepthTest::depthFunction
+ Holds the current function used by depth test. The default is DepthTest.Never.
+ \list
+ \li DepthTest.Never
+ \li DepthTest.Always
+ \li DepthTest.Less
+ \li DepthTest.LessOrEqual
+ \li DepthTest.Equal
+ \li DepthTest.GreaterOrEqual
+ \li DepthTest.Greater
+ \li DepthTest.NotEqual
+ \endlist
+ \sa Qt3DRender::QDepthTest::DepthFunction
+*/
+
+/*!
+ \property QDepthTest::depthFunction
+ Holds the current function used by depth test. The default is Never.
+*/
+
+
+/*!
+ The constructor creates a new QDepthTest::QDepthTest instance with the specified \a parent.
*/
QDepthTest::QDepthTest(QNode *parent)
: QRenderState(*new QDepthTestPrivate, parent)
@@ -67,19 +131,12 @@ QDepthTest::~QDepthTest()
{
}
-/*!
- * \return the current enabled depth function.
- */
QDepthTest::DepthFunction QDepthTest::depthFunction() const
{
Q_D(const QDepthTest);
return d->m_depthFunction;
}
-/*!
- * Sets the depth function being enabled to \a depthFunction
- * \param depthFunction
- */
void QDepthTest::setDepthFunction(QDepthTest::DepthFunction depthFunction)
{
Q_D(QDepthTest);
diff --git a/src/render/renderstates/qdithering.cpp b/src/render/renderstates/qdithering.cpp
index cecf817d9..102cfa0ff 100644
--- a/src/render/renderstates/qdithering.cpp
+++ b/src/render/renderstates/qdithering.cpp
@@ -48,14 +48,31 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QDithering
- * \brief The QDithering class
- * \inmodule Qt3DRender
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QDithering
+ \since 5.7
+ \inmodule Qt3DRender
+ \brief Enable dithering
+
+ A Qt3DRender::QDithering class enables dithering. Dithering adds noise to the
+ color values to randomize quantization error in order to prevent large scale
+ patterns in the final image, such as banding. Dithering is most useful when
+ rendering to a surface with low color bit depth, such as RGB565 or RGBA4444.
+ */
+
+/*!
+ \qmltype Dithering
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QDithering
+ \brief Enable dithering
+
+ A Dithering type enables dithering. Dithering adds noise to the
+ color values to randomize quantization error in order to prevent large scale
+ patterns in the final image, such as banding. Dithering is most useful when
+ rendering to a surface with low color bit depth, such as RGB565 or RGBA4444.
*/
-/*! \internal */
class QDitheringPrivate : public QRenderStatePrivate
{
public:
@@ -67,8 +84,8 @@ public:
};
/*!
- * The constructor creates a new QDithering::QDithering instance with
- * the specified \a parent.
+ The constructor creates a new QDithering::QDithering instance with
+ the specified \a parent.
*/
QDithering::QDithering(QNode *parent)
: QRenderState(*new QDitheringPrivate, parent)
diff --git a/src/render/renderstates/qfrontface.cpp b/src/render/renderstates/qfrontface.cpp
index 016f27370..a814be82f 100644
--- a/src/render/renderstates/qfrontface.cpp
+++ b/src/render/renderstates/qfrontface.cpp
@@ -38,13 +38,6 @@
**
****************************************************************************/
-/*!
- * \class QFrontFace
- * \brief The QFrontFace class defines front and back facing polygons.
- * \since 5.7
- * \ingroup renderstates
- *
- */
#include "qfrontface.h"
#include "qfrontface_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -54,8 +47,52 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QFrontFace::QFrontFace instance with the
- * specified \a parent
+ \class Qt3DRender::QFrontFace
+ \brief The QFrontFace class defines front and back facing polygons.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QFrontFace sets the winding direction of the front facing polygons.
+
+ \sa QCullFace
+ */
+
+/*!
+ \qmltype FrontFace
+ \brief The FrontFace type defines front and back facing polygons.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QFrontFace
+
+ A FrontFace sets the winding direction of the front facing polygons.
+
+ \sa CullFace
+ */
+
+/*!
+ \enum QFrontFace::WindingDirection
+
+ This enumeration specifies the winding direction values.
+ \value ClockWise Clockwise polygons are front facing.
+ \value CounterClockWise Counter clockwise polygons are front facing.
+*/
+
+/*!
+ \qmlproperty enumeration FrontFace::direction
+ Holds the winding direction of the front facing polygons. Default is FrontFace.Clockwise.
+*/
+
+/*!
+ \property QFrontFace::direction
+ Holds the winding direction of the front facing polygons. Default is Clockwise.
+*/
+
+/*!
+ The constructor creates a new QFrontFace::QFrontFace instance with the
+ specified \a parent
*/
QFrontFace::QFrontFace(QNode *parent)
: QRenderState(*new QFrontFacePrivate, parent)
@@ -67,19 +104,12 @@ QFrontFace::~QFrontFace()
{
}
-/*!
- * \return the current winding direction
- */
QFrontFace::WindingDirection QFrontFace::direction() const
{
Q_D(const QFrontFace);
return d->m_direction;
}
-/*!
- * Sets the winding direction to \a direction
- * \param direction
- */
void QFrontFace::setDirection(QFrontFace::WindingDirection direction)
{
Q_D(QFrontFace);
diff --git a/src/render/renderstates/qmultisampleantialiasing.cpp b/src/render/renderstates/qmultisampleantialiasing.cpp
index ae398cd0d..923fc435e 100644
--- a/src/render/renderstates/qmultisampleantialiasing.cpp
+++ b/src/render/renderstates/qmultisampleantialiasing.cpp
@@ -47,13 +47,29 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class QMultiSampleAntiAliasing
- * \brief The QMultiSampleAntiAliasing class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QMultiSampleAntiAliasing
+ \brief Enable multisample antialiasing
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QMultiSampleAntiAliasing class enables multisample antialiasing.
+ The render target must have been allocated with multisampling enabled.
+ */
+
+/*!
+ \qmltype MultiSampleAntiAliasing
+ \brief Enable multisample antialiasing
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QMultiSampleAntiAliasing
+
+ A MultiSampleAntiAliasing type enables multisample antialiasing.
+ The render target must have been allocated with multisampling enabled.
*/
-/*! \internal */
class QMultiSampleAntiAliasingPrivate : public QRenderStatePrivate
{
public:
@@ -66,8 +82,8 @@ public:
};
/*!
- * The constructor creates a new QMultiSampleAntiAliasing::QMultiSampleAntiAliasing
- * instance with the specified \a parent.
+ The constructor creates a new QMultiSampleAntiAliasing::QMultiSampleAntiAliasing
+ instance with the specified \a parent.
*/
QMultiSampleAntiAliasing::QMultiSampleAntiAliasing(QNode *parent)
: QRenderState(*new QMultiSampleAntiAliasingPrivate, parent)
diff --git a/src/render/renderstates/qnodepthmask.cpp b/src/render/renderstates/qnodepthmask.cpp
index b508f60b3..f0376cfb6 100644
--- a/src/render/renderstates/qnodepthmask.cpp
+++ b/src/render/renderstates/qnodepthmask.cpp
@@ -48,13 +48,31 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class QNoDepthMask
- * \brief The QNoDepthMask class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QNoDepthMask
+ \brief Disable depth write
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QNoDepthMask class disables fragment depth write to depth buffer.
+
+ \sa Qt3DRender::QDepthTest
+ */
+
+/*!
+ \qmltype NoDepthMask
+ \brief Disable depth write
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QNoDepthMask
+
+ A NoDepthMask type disables fragment depth write to depth buffer.
+
+ \sa Qt3DRender::QDepthTest
*/
-/*! \internal */
class QNoDepthMaskPrivate : public QRenderStatePrivate
{
public:
@@ -67,8 +85,8 @@ public:
};
/*!
- * the constructor creates a new QNoDepthMask::QNoDepthMask instance with
- * the specified \a parent.
+ The constructor creates a new QNoDepthMask::QNoDepthMask instance with
+ the specified \a parent.
*/
QNoDepthMask::QNoDepthMask(QNode *parent)
: QRenderState(*new QNoDepthMaskPrivate, parent)
diff --git a/src/render/renderstates/qpointsize.cpp b/src/render/renderstates/qpointsize.cpp
index 03c37bc4b..10687f8f2 100644
--- a/src/render/renderstates/qpointsize.cpp
+++ b/src/render/renderstates/qpointsize.cpp
@@ -48,6 +48,7 @@ namespace Qt3DRender {
/*!
\class Qt3DRender::QPointSize
\inmodule Qt3DRender
+ \since 5.7
\brief Specifies the size of rasterized points. May either be set statically
or by shader programs.
@@ -59,6 +60,8 @@ namespace Qt3DRender {
/*!
\qmltype PointSize
+ \since 5.7
+ \inherits RenderState
\instantiates Qt3DRender::QPointSize
\inqmlmodule Qt3D.Render
@@ -72,12 +75,29 @@ namespace Qt3DRender {
*/
/*!
- \qmlproperty float Qt3D.Render::QPointSize::value
+ \enum Qt3DRender::QPointSize::SizeMode
+
+ This enumeration specifies values for the size mode.
+ \value Fixed The point size is by the QPointSize::value.
+ \value Programmable The point size value must be set in shader
+*/
+/*!
+ \qmlproperty real PointSize::value
+ Specifies the point size value to be used.
+*/
+
+/*!
+ \qmlproperty enumeration PointSize::sizeMode
+ Specifies the sizeMode to be used.
+*/
+
+/*!
+ \property QPointSize::value
Specifies the point size value to be used.
*/
/*!
- \qmlproperty QPointSize::SizeMode Qt3D.Render::QPointSize::sizeMode
+ \property QPointSize::sizeMode
Specifies the sizeMode to be used.
*/
diff --git a/src/render/renderstates/qpolygonoffset.cpp b/src/render/renderstates/qpolygonoffset.cpp
index d9703ab4b..0d397f159 100644
--- a/src/render/renderstates/qpolygonoffset.cpp
+++ b/src/render/renderstates/qpolygonoffset.cpp
@@ -37,14 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QPolygonOffset
- * \brief The QPolygonOffset class sets the scale and steps to calculate depth
- * values for polygon offsets.
- * \since 5.7
- * \ingroup renderstates
- *
- */
#include "qpolygonoffset.h"
#include "qpolygonoffset_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -54,8 +46,58 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QPolygonOffset::QPolygonOffset instance
- * with the specified \a parent
+ \class Qt3DRender::QPolygonOffset
+ \brief The QPolygonOffset class sets the scale and steps to calculate depth
+ values for polygon offsets.
+ \since 5.7
+ \inmodule Qt3DRender
+ \ingroup renderstates
+
+ A QPolygonOffset class adds an offset to the fragment depth value prior to
+ depth test and depth write. The offset can be used to avoid z-fighting when
+ rendering polygons with very close depth values such as decals.
+ */
+
+/*!
+ \qmltype PolygonOffset
+ \brief The PolygonOffset type sets the scale and steps to calculate depth
+ values for polygon offsets.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \ingroup renderstates
+ \inherits RenderState
+ \instantiates Qt3DRender::QPolygonOffset
+
+ A PolygonOffset type adds an offset to the fragment depth value prior to
+ depth test and depth write. The offset can be used to avoid z-fighting when
+ rendering polygons with very close depth values such as decals.
+ */
+
+/*!
+ \qmlproperty real PolygonOffset::scaleFactor
+ Holds the scale factor used to create a variable depth offset for
+ each polygon. Default value is 0.
+*/
+
+/*!
+ \qmlproperty real PolygonOffset::depthSteps
+ Holds the units that create constant depth offsets. Default value is 0.
+*/
+
+/*!
+ \property QPolygonOffset::scaleFactor
+ Holds the scale factor used to create a variable depth offset for
+ each polygon. Default value is 0.
+*/
+
+/*!
+ \property QPolygonOffset::depthSteps
+ Holds the units that create constant depth offsets. Default value is 0.
+*/
+
+/*!
+ The constructor creates a new QPolygonOffset::QPolygonOffset instance
+ with the specified \a parent
*/
QPolygonOffset::QPolygonOffset(QNode *parent)
: QRenderState(*new QPolygonOffsetPrivate, parent)
@@ -67,20 +109,12 @@ QPolygonOffset::~QPolygonOffset()
{
}
-/*!
- * \return the current scale factor.
- */
float QPolygonOffset::scaleFactor() const
{
Q_D(const QPolygonOffset);
return d->m_scaleFactor;
}
-/*!
- * Sets the scale factor used to create a variable depth offset for
- * each polygon, to \a scaleFactor. Default value is 0.
- * \param scaleFactor
- */
void QPolygonOffset::setScaleFactor(float scaleFactor)
{
Q_D(QPolygonOffset);
@@ -90,19 +124,12 @@ void QPolygonOffset::setScaleFactor(float scaleFactor)
}
}
-/*!
- * \return the current depth steps.
- */
float QPolygonOffset::depthSteps() const
{
Q_D(const QPolygonOffset);
return d->m_depthSteps;
}
-/*!
- * Sets the units that create constant depth offsets, to depthSteps.
- * \param depthSteps
- */
void QPolygonOffset::setDepthSteps(float depthSteps)
{
Q_D(QPolygonOffset);
diff --git a/src/render/renderstates/qrenderstate.cpp b/src/render/renderstates/qrenderstate.cpp
index 974d8f602..e49292dbd 100644
--- a/src/render/renderstates/qrenderstate.cpp
+++ b/src/render/renderstates/qrenderstate.cpp
@@ -47,10 +47,26 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class QRenderState
- * \brief The QRenderState class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QRenderState
+ \brief An abstract base class for all render states
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QRenderState class is abstract base class for all render states.
+ One can not instantiate QRenderState directly, but through its subclasses.
+ */
+
+/*!
+ \qmltype RenderState
+ \brief An abstract base type for all render states
+ \since 5.7
+ \inherits Node
+ \instantiates Qt3DRender::QRenderState
+ \ingroup renderstates
+
+ A RenderState type is abstract base class for all render states.
+ One can not instantiate RenderState directly, but through its subclasses.
*/
/*! \internal */
diff --git a/src/render/renderstates/qscissortest.cpp b/src/render/renderstates/qscissortest.cpp
index e363ba54d..718978b7a 100644
--- a/src/render/renderstates/qscissortest.cpp
+++ b/src/render/renderstates/qscissortest.cpp
@@ -38,15 +38,6 @@
**
****************************************************************************/
-/*!
- * \class QScissorTest
- * \brief The QScissorTest class discards fragments that fall outside of a
- * certain rectangular portion of the screen.
- * \since 5.7
- * \ingroup renderstates
- *
- */
-
#include "qscissortest.h"
#include "qscissortest_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -56,8 +47,76 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QScissorTest::QScissorTest instance with the
- * specified \a parent
+ \class Qt3DRender::QScissorTest
+ \brief The QScissorTest class discards fragments that fall outside of a
+ certain rectangular portion of the screen.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A QScissorTest class enables scissor test, which discards fragments outside
+ the rectangular area of the screen specified by the left, bottom, width and
+ height properties.
+ */
+
+/*!
+ \qmltype ScissorTest
+ \brief The ScissorTest type discards fragments that fall outside of a
+ certain rectangular portion of the screen.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QScissorTest
+ \inherits RenderState
+
+ A ScissorTest type enables scissor test, which discards fragments outside
+ the rectangular area of the screen specified by the left, bottom, width and
+ height properties.
+ */
+
+/*!
+ \qmlproperty int ScissorTest::left
+ Holds the left coordinate of the scissor box.
+*/
+
+/*!
+ \qmlproperty int ScissorTest::bottom
+ Holds the bottom coordinate of the scissor box.
+*/
+
+/*!
+ \qmlproperty int ScissorTest::width
+ Holds the width of the scissor box.
+*/
+
+/*!
+ \qmlproperty int ScissorTest::height
+ Holds the height of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::left
+ Holds the left coordinate of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::bottom
+ Holds the bottom coordinate of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::width
+ Holds the width of the scissor box.
+*/
+
+/*!
+ \property QScissorTest::height
+ Holds the height of the scissor box.
+*/
+
+/*!
+ The constructor creates a new QScissorTest::QScissorTest instance with the
+ specified \a parent
*/
QScissorTest::QScissorTest(QNode *parent)
: QRenderState(*new QScissorTestPrivate, parent)
@@ -69,19 +128,12 @@ QScissorTest::~QScissorTest()
{
}
-/*!
- * \return the left of the scissor box
- */
int QScissorTest::left() const
{
Q_D(const QScissorTest);
return d->m_left;
}
-/*!
- * Sets the left of the scissor box to \a setLeft
- * \param left
- */
void QScissorTest::setLeft(int left)
{
Q_D(QScissorTest);
@@ -91,19 +143,12 @@ void QScissorTest::setLeft(int left)
}
}
-/*!
- * \return the bottom of the scrissor box
- */
int QScissorTest::bottom() const
{
Q_D(const QScissorTest);
return d->m_bottom;
}
-/*!
- * Sets the bottom of the scissor box to \a bottom
- * \param bottom
- */
void QScissorTest::setBottom(int bottom)
{
Q_D(QScissorTest);
@@ -113,19 +158,12 @@ void QScissorTest::setBottom(int bottom)
}
}
-/*!
- * \return the width of the scissor box
- */
int QScissorTest::width() const
{
Q_D(const QScissorTest);
return d->m_width;
}
-/*!
- * Sets the width of the scissor box to \a width
- * \param width
- */
void QScissorTest::setWidth(int width)
{
Q_D(QScissorTest);
@@ -135,19 +173,12 @@ void QScissorTest::setWidth(int width)
}
}
-/*!
- * \return the height of the scissor box
- */
int QScissorTest::height() const
{
Q_D(const QScissorTest);
return d->m_height;
}
-/*!
- * Sets the height of the scissor box to \a height
- * \param height
- */
void QScissorTest::setHeight(int height)
{
Q_D(QScissorTest);
diff --git a/src/render/renderstates/qseamlesscubemap.cpp b/src/render/renderstates/qseamlesscubemap.cpp
index cc72f34ad..860b36450 100644
--- a/src/render/renderstates/qseamlesscubemap.cpp
+++ b/src/render/renderstates/qseamlesscubemap.cpp
@@ -47,16 +47,28 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QSeamlessCubemap
- * \brief Enables seamless cubemap texture filtering.
- * \inmodule Qt3DRender
- * \since 5.7
- * \ingroup renderstates
- * When present in a state set, enables the seamless cubemap texture filtering
- * as provided by the GL_ARB_seamless_cubemap extension (if available).
+ \class Qt3DRender::QSeamlessCubemap
+ \brief Enables seamless cubemap texture filtering.
+ \since 5.7
+ \inmodule Qt3DRender
+
+ When present in a state set, enables the seamless cubemap texture filtering
+ as provided by the GL_ARB_seamless_cubemap extension (if available).
*/
-/*! \internal */
+/*!
+ \qmltype SeamlessCubemap
+ \brief Enables seamless cubemap texture filtering.
+ \since 5.7
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QSeamlessCubemap
+ \inherits RenderState
+
+ When present in a state set, enables the seamless cubemap texture filtering
+ as provided by the GL_ARB_seamless_cubemap extension (if available).
+ */
+
+
class QSeamlessCubemapPrivate : public QRenderStatePrivate
{
public:
@@ -69,8 +81,8 @@ public:
};
/*!
- * The constructor creates a new QSeamlessCubemap::QSeamlessCubemap instance
- * with the specified \a parent.
+ The constructor creates a new QSeamlessCubemap::QSeamlessCubemap instance
+ with the specified \a parent.
*/
QSeamlessCubemap::QSeamlessCubemap(QNode *parent)
: QRenderState(*new QSeamlessCubemapPrivate, parent)
diff --git a/src/render/renderstates/qstencilmask.cpp b/src/render/renderstates/qstencilmask.cpp
index 64cffbe8a..1b9b2cd10 100644
--- a/src/render/renderstates/qstencilmask.cpp
+++ b/src/render/renderstates/qstencilmask.cpp
@@ -37,15 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QStencilMask
- * \brief The QStencilMask class controls the front and back writing of
- * individual bits in the stencil planes.
- * \since 5.7
- * \ingroup renderstates
- *
- */
-
#include "qstencilmask.h"
#include "qstencilmask_p.h"
#include <Qt3DRender/private/qrenderstatecreatedchange_p.h>
@@ -55,8 +46,61 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QStencilMask::QStencilMask instance with the
- * specified \a parent.
+ \class Qt3DRender::QStencilMask
+ \brief The QStencilMask class controls the front and back writing of
+ individual bits in the stencil planes.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QStencilMask class specifies a write mask for the stencil values
+ after the stencil test. Mask can be specified separately for the front-facing
+ and back-facing polygons. The fragment stencil value is and'd with the mask
+ before it is written to the stencil buffer.
+
+ \sa Qt3DRender::QStencilTest
+ */
+
+/*!
+ \qmltype StencilMask
+ \brief The StencilMask type controls the front and back writing of
+ individual bits in the stencil planes.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QStencilMask
+ \inherits RenderState
+
+ A StencilMask type specifies the mask for the stencil test. Mask can be specified
+ separately for the front-facing and back-facing polygons. The stencil test reference
+ value and stencil buffer value gets and'd with the mask prior to applying stencil function.
+
+ \sa StencilTest
+ */
+
+/*!
+ \qmlproperty int StencilMask::frontOutputMask
+ Holds the write mask for the fragment stencil values for front-facing polygons.
+*/
+
+/*!
+ \qmlproperty int StencilMask::backOutputMask
+ Holds the write mask for the fragment stencil values for back-facing polygons.
+*/
+
+/*!
+ \property QStencilMask::frontOutputMask
+ Holds the write mask for the fragment stencil values for front-facing polygons.
+*/
+
+/*!
+ \property QStencilMask::backOutputMask
+ Holds the write mask for the fragment stencil values for back-facing polygons.
+*/
+
+/*!
+ The constructor creates a new QStencilMask::QStencilMask instance with the
+ specified \a parent.
*/
QStencilMask::QStencilMask(QNode *parent)
: QRenderState(*new QStencilMaskPrivate(), parent)
@@ -68,10 +112,6 @@ QStencilMask::~QStencilMask()
{
}
-/*!
- * Sets the front output mask to \a mask.
- * \param mask
- */
void QStencilMask::setFrontOutputMask(uint mask)
{
Q_D(QStencilMask);
@@ -81,10 +121,6 @@ void QStencilMask::setFrontOutputMask(uint mask)
}
}
-/*!
- * Sets the back output mask to \a mask.
- * \param mask
- */
void QStencilMask::setBackOutputMask(uint mask)
{
Q_D(QStencilMask);
@@ -94,18 +130,12 @@ void QStencilMask::setBackOutputMask(uint mask)
}
}
-/*!
- * \return the front output mask.
- */
uint QStencilMask::frontOutputMask() const
{
Q_D(const QStencilMask);
return d->m_frontOutputMask;
}
-/*!
- * \return the back output mask.
- */
uint QStencilMask::backOutputMask() const
{
Q_D(const QStencilMask);
diff --git a/src/render/renderstates/qstenciloperation.cpp b/src/render/renderstates/qstenciloperation.cpp
index 0b3842c53..7a5b113d8 100644
--- a/src/render/renderstates/qstenciloperation.cpp
+++ b/src/render/renderstates/qstenciloperation.cpp
@@ -37,14 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QStencilOperation
- * \brief The QStencilOperation class allows the selection of either the front
- * or back sides.
- * \since 5.7
- * \ingroup renderstates
- */
-
#include "qstenciloperation.h"
#include "qstenciloperation_p.h"
#include "qstenciloperationarguments.h"
@@ -55,8 +47,58 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QStencilOperation::QStencilOperation instance with
- * the specified \a parent.
+ \class Qt3DRender::QStencilOperation
+ \brief The QStencilOperation class specifies stencil operation
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ A Qt3DRender::QStencilOperation class specifies the stencil operations
+ for the front- and back-facing polygons. The stencil operation control
+ what is done to fragment when the stencil and depth test pass or fail.
+
+ \sa Qt3DRender::QStencilTest
+ */
+
+/*!
+ \qmltype StencilOperation
+ \brief The StencilOperation type specifies stencil operation
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \inherits RenderState
+ \instantiates Qt3DRender::QStencilOperation
+
+ A StencilOperation type specifies the stencil operations
+ for the front- and back-facing polygons. The stencil operation control
+ what is done to fragment when the stencil and depth test pass or fail.
+
+ \sa StencilTest
+ */
+
+/*!
+ \qmlproperty StencilOperationArguments StencilOperation::front
+ Holds the stencil operation arguments for front-facing polygons.
+*/
+
+/*!
+ \qmlproperty StencilOperationArguments StencilOperation::back
+ Holds the stencil operation arguments for back-facing polygons.
+*/
+
+/*!
+ \property QStencilOperation::front
+ Holds the stencil operation arguments for front-facing polygons.
+*/
+
+/*!
+ \property QStencilOperation::back
+ Holds the stencil operation arguments for back-facing polygons.
+*/
+
+/*!
+ The constructor creates a new QStencilOperation::QStencilOperation instance with
+ the specified \a parent.
*/
QStencilOperation::QStencilOperation(QNode *parent)
: QRenderState(*new QStencilOperationPrivate(), parent)
@@ -68,18 +110,12 @@ QStencilOperation::~QStencilOperation()
{
}
-/*!
- * \return the front fragments.
- */
QStencilOperationArguments *QStencilOperation::front() const
{
Q_D(const QStencilOperation);
return d->m_front;
}
-/*!
- * \return the back fragments.
- */
QStencilOperationArguments *QStencilOperation::back() const
{
Q_D(const QStencilOperation);
diff --git a/src/render/renderstates/qstenciloperationarguments.cpp b/src/render/renderstates/qstenciloperationarguments.cpp
index a7b1192be..f5d0c1f4f 100644
--- a/src/render/renderstates/qstenciloperationarguments.cpp
+++ b/src/render/renderstates/qstenciloperationarguments.cpp
@@ -37,15 +37,6 @@
**
****************************************************************************/
-/*!
- * \class QStencilOperationArguments
- * \brief The QStencilOperationArguments class sets the actions to be taken
- * when stencil and depth tests fail.
- * \since 5.7
- * \ingroup renderstates
- *
- */
-
#include "qstenciloperationarguments.h"
#include "qstenciloperationarguments_p.h"
@@ -54,8 +45,123 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * The constructor creates a new QStencilOperationArguments::QStencilOperationArguments
- * instance with the specified \a mode and \a parent.
+ \class Qt3DRender::QStencilOperationArguments
+ \brief The QStencilOperationArguments class sets the actions to be taken
+ when stencil and depth tests fail.
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ The Qt3DRender::QStencilOperationArguments class specifies the arguments for
+ the stencil operations.
+
+ \sa Qt3DRender::QStencilOperation
+ */
+
+/*!
+ \qmltype StencilOperationArguments
+ \brief The StencilOperationArguments type sets the actions to be taken
+ when stencil and depth tests fail.
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QStencilOperationArguments
+ \inherits QtObject
+
+ The StencilOperationArguments type specifies the arguments for the stencil operations.
+
+ \sa StencilOperation
+ */
+
+/*!
+ \enum Qt3DRender::QStencilOperationArguments::FaceMode
+ This enumeration holds the values for stencil operation argument face modes
+ \value Front Arguments are applied to front-facing polygons.
+ \value Back Arguments are applied to back-facing polygons.
+ \value FrontAndBack Arguments are applied to both front- and back-facing polygons.
+*/
+
+/*!
+ \enum Qt3DRender::QStencilOperationArguments::Operation
+ This enumeration holds the values for stencil operation.
+ \value Zero Set stencil value to zero.
+ \value Keep Keep current stencil value.
+ \value Replace Replace with the masked fragment stencil value.
+ \value Increment Increment current value with saturation.
+ \value Decrement Decrement current value with saturation.
+ \value IncrementWrap Increment current value with wrap.
+ \value DecrementWrap Decrement current value with wrap.
+ \value Invert Invert the current value.
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \list
+ \li StencilOperationArguments.Front
+ \li StencilOperationArguments.Back
+ \li StencilOperationArguments.FrontAndBack
+ \endlist
+ \sa Qt3DRender::QStencilOperationArguments::FaceMode
+ \readonly
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::stencilTestFailureOperation
+ Holds the stencil test operation for when the stencil test fails.
+ Default is StencilOperationArguments.Keep.
+ \list
+ \li StencilOperationArguments.Zero
+ \li StencilOperationArguments.Keep
+ \li StencilOperationArguments.Replace
+ \li StencilOperationArguments.Increment
+ \li StencilOperationArguments.Decrement
+ \li StencilOperationArguments.IncrementWrap
+ \li StencilOperationArguments.DecrementWrap
+ \li StencilOperationArguments.Inverter
+ \endlist
+ \sa Qt3DRender::QStencilOperationArguments::Operation
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::depthTestFailureOperation
+ Holds the stencil test operation for when the stencil test passes, but
+ depth test fails. Default is StencilOperationArguments.Keep.
+ \sa StencilOperationArguments::stencilTestFailureOperation, Qt3DRender::QStencilOperationArguments::Operation
+*/
+
+/*!
+ \qmlproperty enumeration StencilOperationArguments::allTestsPassOperation
+ Holds the stencil test operation for when depth and stencil test pass. Default is StencilOperationArguments.Keep.
+ \sa StencilOperationArguments::stencilTestFailureOperation, Qt3DRender::QStencilOperationArguments::Operation
+*/
+
+/*!
+ \property QStencilOperationArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \readonly
+*/
+
+/*!
+ \property QStencilOperationArguments::stencilTestFailureOperation
+ Holds the stencil test operation for when the stencil test fails.
+ Default is StencilOperationArguments.Keep.
+*/
+
+/*!
+ \property QStencilOperationArguments::depthTestFailureOperation
+ Holds the stencil test operation for when the stencil test passes, but
+ depth test fails. Default is StencilOperationArguments.Keep.
+*/
+
+/*!
+ \property QStencilOperationArguments::allTestsPassOperation
+ Holds the stencil test operation for when depth and stencil test pass. Default is StencilOperationArguments.Keep.
+*/
+
+/*!
+ The constructor creates a new QStencilOperationArguments::QStencilOperationArguments
+ instance with the specified \a mode and \a parent.
*/
QStencilOperationArguments::QStencilOperationArguments(FaceMode mode, QObject *parent)
: QObject(*new QStencilOperationArgumentsPrivate(mode), parent)
@@ -67,19 +173,12 @@ QStencilOperationArguments::~QStencilOperationArguments()
{
}
-/*!
- * \return the current face mode.
- */
QStencilOperationArguments::FaceMode QStencilOperationArguments::faceMode() const
{
Q_D(const QStencilOperationArguments);
return d->m_face;
}
-/*!
- * Sets the stencil action when a test fails, to operation.
- * \param operation
- */
void QStencilOperationArguments::setStencilTestFailureOperation(QStencilOperationArguments::Operation operation)
{
Q_D(QStencilOperationArguments);
@@ -89,19 +188,12 @@ void QStencilOperationArguments::setStencilTestFailureOperation(QStencilOperatio
}
}
-/*!
- * \return the current stencil test failure operation.
- */
QStencilOperationArguments::Operation QStencilOperationArguments::stencilTestFailureOperation() const
{
Q_D(const QStencilOperationArguments);
return d->m_stencilTestFailureOperation;
}
-/*!
- * Sets the action when the depth test fails, to operation.
- * \param operation
- */
void QStencilOperationArguments::setDepthTestFailureOperation(QStencilOperationArguments::Operation operation)
{
Q_D(QStencilOperationArguments);
@@ -111,19 +203,12 @@ void QStencilOperationArguments::setDepthTestFailureOperation(QStencilOperationA
}
}
-/*!
- * \return the current depth test failure operation.
- */
QStencilOperationArguments::Operation QStencilOperationArguments::depthTestFailureOperation() const
{
Q_D(const QStencilOperationArguments);
return d->m_depthTestFailureOperation;
}
-/*!
- * Sets the action when both the depth and stencil tests fail, to operation.
- * \param operation
- */
void QStencilOperationArguments::setAllTestsPassOperation(QStencilOperationArguments::Operation operation)
{
Q_D(QStencilOperationArguments);
@@ -133,9 +218,6 @@ void QStencilOperationArguments::setAllTestsPassOperation(QStencilOperationArgum
}
}
-/*!
- * \return the current failure operation for when both tests fail.
- */
QStencilOperationArguments::Operation QStencilOperationArguments::allTestsPassOperation() const
{
Q_D(const QStencilOperationArguments);
diff --git a/src/render/renderstates/qstenciltest.cpp b/src/render/renderstates/qstenciltest.cpp
index 7cbff2769..f1e42f1e3 100644
--- a/src/render/renderstates/qstenciltest.cpp
+++ b/src/render/renderstates/qstenciltest.cpp
@@ -48,16 +48,60 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class Qt3DRender::QStencilTest
- * \brief The QStencilTest class
- * \inmodule Qt3DRender
- * \ingroup renderstates
- * \since 5.7
+ \class Qt3DRender::QStencilTest
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+ \brief The QStencilTest class specifies arguments for the stecil test
+
+ A Qt3DRender::QStencilTest class specifies argument for the stencil test.
+ The stencil test comprises of three arguments: stencil test function,
+ stencil test mask and stencil reference value. QStencilTest allows these
+ arguments to be set for both front- and back-facing polygons separately.
+
+ \sa Qt3DRender::QStencilMask, Qt3DRender::QStencilOperation
*/
/*!
- * The constructor creates a new QStencilTest::QStencilTest instance with
- * the specified \a parent.
+ \qmltype StencilTest
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \brief The StencilTest type specifies arguments for the stecil test
+ \inherits RenderState
+ \instantiates Qt3DRender::QStencilTest
+
+ A StencilTest type specifies argument for the stencil test.
+ The stencil test comprises of three arguments: stencil test function,
+ stencil test mask and stencil reference value. StencilTest allows these
+ arguments to be set for both front- and back-facing polygons separately.
+
+ \sa StencilMask, StencilOperation
+ */
+
+/*!
+ \qmlproperty StencilTestArguments StencilTest::front
+ Holds the stencil test arguments for front-facing polygons.
+*/
+
+/*!
+ \qmlproperty StencilTestArguments StencilTest::back
+ Holds the stencil test arguments for back-facing polygons.
+*/
+
+/*!
+ \property QStencilTest::front
+ Holds the stencil test arguments for front-facing polygons.
+*/
+
+/*!
+ \property QStencilTest::back
+ Holds the stencil test arguments for back-facing polygons.
+*/
+
+/*!
+ The constructor creates a new QStencilTest::QStencilTest instance with
+ the specified \a parent.
*/
QStencilTest::QStencilTest(QNode *parent)
: QRenderState(*new QStencilTestPrivate, parent)
@@ -69,18 +113,12 @@ QStencilTest::~QStencilTest()
{
}
-/*!
- * \return the stencil test for the front
- */
QStencilTestArguments *QStencilTest::front() const
{
Q_D(const QStencilTest);
return d->m_front;
}
-/*!
- * \return the stencil test for the back
- */
QStencilTestArguments *QStencilTest::back() const
{
Q_D(const QStencilTest);
diff --git a/src/render/renderstates/qstenciltestarguments.cpp b/src/render/renderstates/qstenciltestarguments.cpp
index 1e618e372..ae1fd1111 100644
--- a/src/render/renderstates/qstenciltestarguments.cpp
+++ b/src/render/renderstates/qstenciltestarguments.cpp
@@ -45,15 +45,113 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
/*!
- * \class QStencilTestArguments
- * \brief The QStencilTestArguments class
- * \since 5.7
- * \ingroup renderstates
+ \class Qt3DRender::QStencilTestArguments
+ \brief The QStencilTestArguments class specifies arguments for stencil test
+ \since 5.7
+ \ingroup renderstates
+ \inmodule Qt3DRender
+
+ The Qt3DRender::QStencilTestArguments class specifies the arguments for
+ the stencil test.
+ */
+
+/*!
+ \qmltype StencilTestArguments
+ \brief The StencilTestArguments type specifies arguments for stencil test
+ \since 5.7
+ \ingroup renderstates
+ \inqmlmodule Qt3D.Render
+ \instantiates Qt3DRender::QStencilTestArguments
+ \inherits QtObject
+
+ The StencilTestArguments type specifies the arguments for
+ the stencil test.
*/
/*!
- * The constructor creates a new QStencilTestArguments::QStencilTestArguments
- * instance with the specified \a face and \a parent.
+ \enum Qt3DRender::QStencilTestArguments::StencilFaceMode
+ This enumeration holds the values for stencil test arguments face modes
+ \value Front Arguments are applied to front-facing polygons.
+ \value Back Arguments are applied to back-facing polygons.
+ \value FrontAndBack Arguments are applied to both front- and back-facing polygons.
+*/
+
+/*!
+ \enum Qt3DRender::QStencilTestArguments::StencilFunction
+
+ Enumeration for the stencil function values
+ \value Never Never pass stencil test
+ \value Always Always pass stencil test
+ \value Less Pass stencil test if fragment stencil is less than reference value
+ \value LessOrEqual Pass stencil test if fragment stencil is less than or equal to reference value
+ \value Equal Pass stencil test if fragment stencil is equal to reference value
+ \value GreaterOrEqual Pass stencil test if fragment stencil is greater than or equal to reference value
+ \value Greater Pass stencil test if fragment stencil is greater than reference value
+ \value NotEqual Pass stencil test if fragment stencil is not equal to reference value
+*/
+
+/*!
+ \qmlproperty enumeration StencilTestArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \list
+ \li StencilTestArguments.Front
+ \li StencilTestArguments.Back
+ \li StencilTestArguments.FrontAndBack
+ \endlist
+ \sa Qt3DRender::QStencilTestArguments::StencilFaceMode
+ \readonly
+*/
+
+/*!
+ \qmlproperty int StencilTestArguments::comparisonMask
+ Holds the stencil test comparison mask. Default is all zeroes.
+*/
+
+/*!
+ \qmlproperty int StencilTestArguments::referenceValue
+ Holds the stencil test reference value. Default is zero.
+*/
+
+/*!
+ \qmlproperty enumeration StencilTestArguments::stencilFunction
+ Holds the stencil test function. Default is StencilTestArguments.Never.
+ \list
+ \li StencilTestArguments.Never
+ \li StencilTestArguments.Always
+ \li StencilTestArguments.Less
+ \li StencilTestArguments.LessOrEqual
+ \li StencilTestArguments.Equal
+ \li StencilTestArguments.GreaterOrEqual
+ \li StencilTestArguments.Greater
+ \li StencilTestArguments.NotEqual
+ \endlist
+*/
+
+/*!
+ \property QStencilTestArguments::faceMode
+ Holds the faces the arguments are applied to.
+ \readonly
+*/
+
+/*!
+ \property QStencilTestArguments::comparisonMask
+ Holds the stencil test comparison mask. Default is all zeroes.
+*/
+
+/*!
+ \property QStencilTestArguments::referenceValue
+ Holds the stencil test reference value. Default is zero.
+*/
+
+/*!
+ \property QStencilTestArguments::stencilFunction
+ Holds the stencil test function. Default is Never.
+ \sa Qt3DRender::QStencilTestArguments::StencilFunction
+*/
+
+/*!
+ The constructor creates a new QStencilTestArguments::QStencilTestArguments
+ instance with the specified \a face and \a parent.
*/
QStencilTestArguments::QStencilTestArguments(QStencilTestArguments::StencilFaceMode face, QObject *parent)
: QObject(*new QStencilTestArgumentsPrivate(face), parent)
@@ -65,19 +163,12 @@ QStencilTestArguments::~QStencilTestArguments()
{
}
-/*!
- * \return the current comparison mask.
- */
uint QStencilTestArguments::comparisonMask() const
{
Q_D(const QStencilTestArguments);
return d->m_comparisonMask;
}
-/*!
- * Sets the comparison mask.
- * \param comparisonMask
- */
void QStencilTestArguments::setComparisonMask(uint comparisonMask)
{
Q_D(QStencilTestArguments);
@@ -87,19 +178,12 @@ void QStencilTestArguments::setComparisonMask(uint comparisonMask)
}
}
-/*!
- * \return the current reference value.
- */
int QStencilTestArguments::referenceValue() const
{
Q_D(const QStencilTestArguments);
return d->m_referenceValue;
}
-/*!
- * Sets the reference value.
- * \param referenceValue
- */
void QStencilTestArguments::setReferenceValue(int referenceValue)
{
Q_D(QStencilTestArguments);
@@ -109,19 +193,12 @@ void QStencilTestArguments::setReferenceValue(int referenceValue)
}
}
-/*!
- * \return the current stencil function.
- */
QStencilTestArguments::StencilFunction QStencilTestArguments::stencilFunction() const
{
Q_D(const QStencilTestArguments);
return d->m_stencilFunction;
}
-/*!
- * Sets the stencil function.
- * \param stencilFunction
- */
void QStencilTestArguments::setStencilFunction(QStencilTestArguments::StencilFunction stencilFunction)
{
Q_D(QStencilTestArguments);
@@ -131,9 +208,6 @@ void QStencilTestArguments::setStencilFunction(QStencilTestArguments::StencilFun
}
}
-/*!
- * \return the current face mode.
- */
QStencilTestArguments::StencilFaceMode QStencilTestArguments::faceMode() const
{
Q_D(const QStencilTestArguments);
diff --git a/src/render/renderstates/statevariant_p.h b/src/render/renderstates/statevariant_p.h
index f2a631d2e..e13599e75 100644
--- a/src/render/renderstates/statevariant_p.h
+++ b/src/render/renderstates/statevariant_p.h
@@ -87,17 +87,17 @@ struct StateVariant
u_Data()
{
// Assumes the above types don't need to have their ctor called
- memset(this, 0, sizeof(u_Data));
+ memset(static_cast<void *>(this), 0, sizeof(u_Data));
}
u_Data(const u_Data &other)
{
- memcpy(this, &other, sizeof(u_Data));
+ memcpy(static_cast<void *>(this), static_cast<const void *>(&other), sizeof(u_Data));
}
u_Data& operator=(const u_Data &other)
{
- memcpy(this, &other, sizeof(u_Data));
+ memcpy(static_cast<void *>(this), static_cast<const void *>(&other), sizeof(u_Data));
return *this;
}
@@ -121,7 +121,7 @@ struct StateVariant
#if !defined(_MSC_VER) || (_MSC_VER > 1800)
// all union members start at the same memory address
// so we can just write into whichever we want
- memcpy(&(v.data), &state, sizeof(state));
+ memcpy(static_cast<void *>(&v.data), static_cast<const void *>(&state), sizeof(state));
#else
v.m_impl.reset(new GenericState(state));
#endif