summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2016-09-05 11:26:26 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2016-09-05 08:44:27 +0000
commit0febc2e9be299475e72c4cd348e830cb267ece95 (patch)
treedad6c6774dced293379da2b01aac96895dd5df00
parentd323d7e733100dc2417ae90bdebd4d4704606ead (diff)
Fix QForwardRenderer docs
Change-Id: Ic9fcfa41caa8773a1fa12fa42c6345292ae6160e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--src/extras/defaults/qforwardrenderer.cpp99
1 files changed, 70 insertions, 29 deletions
diff --git a/src/extras/defaults/qforwardrenderer.cpp b/src/extras/defaults/qforwardrenderer.cpp
index 8e6dc9425..32c4a2968 100644
--- a/src/extras/defaults/qforwardrenderer.cpp
+++ b/src/extras/defaults/qforwardrenderer.cpp
@@ -84,26 +84,46 @@ void QForwardRendererPrivate::init()
}
/*!
- \class Qt3DRender::QForwardRenderer
- \brief The Qt3DRender::QForwardRenderer provides a default \l {QFrameGraph}{FrameGraph} implementation of a forward renderer.
- \inmodule Qt3DRender
- \since 5.5
-
- Forward rendering is how OpenGL is traditionally. It renders directly to the backbuffer
+ \class Qt3DExtras::QForwardRenderer
+ \brief The QForwardRenderer provides a default \l{Qt 3D Render Framegraph}{FrameGraph}
+ implementation of a forward renderer.
+ \inmodule Qt3DExtras
+ \since 5.7
+ \inherits Qt3DRender::QTechniqueFilter
+
+ Forward rendering is what OpenGL traditionally uses. It renders directly to the backbuffer
one object at a time shading each one as it goes.
- Internally the Qt3DRender::QForwardRenderer is a subclass of Qt3DRender::QTechniqueFilter.
- This a is a single leaf Framegraph tree which contains a Qt3DRender::QViewport, a Qt3DRender::QCameraSelector
- and a Qt3DRender::QClearBuffers.
- The Qt3DRender::QForwardRenderer has a default requirement annotation whose name is "renderingStyle" and value "forward".
- If you need to filter out your techniques, you should do so based on that annotation.
+ QForwardRenderer is a single leaf \l{Qt 3D Render Framegraph}{FrameGraph} tree which contains
+ a Qt3DRender::QViewport, a Qt3DRender::QCameraSelector, and a Qt3DRender::QClearBuffers.
+ The QForwardRenderer has a default requirement filter key whose name is "renderingStyle" and
+ value "forward".
+ If you need to filter out your techniques, you should do so based on that filter key.
- By default the viewport occupies the whole screen and the clear color is white. Frustum culling is also enabled.
+ By default the viewport occupies the whole screen and the clear color is white.
+ Frustum culling is also enabled.
*/
-
/*!
- Constructs a new Qt3DRender::QForwardRenderer instance with parent object \a parent.
+ \qmltype ForwardRenderer
+ \brief The ForwardRenderer provides a default \l{Qt 3D Render Framegraph}{FrameGraph}
+ implementation of a forward renderer.
+ \since 5.7
+ \inqmlmodule Qt3D.Extras
+ \instantiates Qt3DExtras::QForwardRenderer
+
+ Forward rendering is what OpenGL traditionally uses. It renders directly to the backbuffer
+ one object at a time shading each one as it goes.
+
+ ForwardRenderer is a single leaf \l{Qt 3D Render Framegraph}{FrameGraph} tree which contains
+ a Viewport, a CameraSelector, and a ClearBuffers.
+ The ForwardRenderer has a default requirement filter key whose name is "renderingStyle" and
+ value "forward".
+ If you need to filter out your techniques, you should do so based on that filter key.
+
+ By default the viewport occupies the whole screen and the clear color is white.
+ Frustum culling is also enabled.
*/
+
QForwardRenderer::QForwardRenderer(QNode *parent)
: QTechniqueFilter(*new QForwardRendererPrivate, parent)
{
@@ -115,9 +135,6 @@ QForwardRenderer::QForwardRenderer(QNode *parent)
d->init();
}
-/*!
- Destroys the QForwardRenderer instance.
-*/
QForwardRenderer::~QForwardRenderer()
{
}
@@ -134,11 +151,6 @@ void QForwardRenderer::setClearColor(const QColor &clearColor)
d->m_clearBuffer->setClearColor(clearColor);
}
-/*!
- Sets the camera which should be used to render the scene to \a camera.
-
- \note A camera is a QEntity having a QCameraLens as one of its components.
-*/
void QForwardRenderer::setCamera(Qt3DCore::QEntity *camera)
{
Q_D(QForwardRenderer);
@@ -152,10 +164,15 @@ void QForwardRenderer::setSurface(QObject *surface)
}
/*!
- \property Qt3DRender::QForwardRenderer::viewportRect
+ \qmlproperty rect ForwardRenderer::viewportRect
- Holds the current viewport normalizedRect.
- */
+ Holds the current normalized viewport rectangle.
+*/
+/*!
+ \property QForwardRenderer::viewportRect
+
+ Holds the current normalized viewport rectangle.
+*/
QRectF QForwardRenderer::viewportRect() const
{
Q_D(const QForwardRenderer);
@@ -163,9 +180,16 @@ QRectF QForwardRenderer::viewportRect() const
}
/*!
- \property Qt3DRender::QForwardRenderer::clearColor
+ \qmlproperty color ForwardRenderer::clearColor
+
+ Holds the current clear color of the scene. The frame buffer is initialized to the clear color
+ before rendering.
+*/
+/*!
+ \property QForwardRenderer::clearColor
- Holds the current clearColor.
+ Holds the current clear color of the scene. The frame buffer is initialized to the clear color
+ before rendering.
*/
QColor QForwardRenderer::clearColor() const
{
@@ -174,9 +198,16 @@ QColor QForwardRenderer::clearColor() const
}
/*!
- \property Qt3DRender::QForwardRenderer::camera
+ \qmlproperty Entity ForwardRenderer::camera
+
+ Holds the current camera entity used to render the scene.
+
+ \note A camera is an Entity that has a CameraLens as one of its components.
+*/
+/*!
+ \property QForwardRenderer::camera
- Holds the current QEntity camera used to render the scene.
+ Holds the current camera entity used to render the scene.
\note A camera is a QEntity that has a QCameraLens as one of its components.
*/
@@ -186,6 +217,16 @@ Qt3DCore::QEntity *QForwardRenderer::camera() const
return d->m_cameraSelector->camera();
}
+/*!
+ \qmlproperty Object ForwardRenderer::surface
+
+ Holds the current render surface.
+*/
+/*!
+ \property QForwardRenderer::surface
+
+ Holds the current render surface.
+*/
QObject *QForwardRenderer::surface() const
{
Q_D(const QForwardRenderer);