QForwardRenderer Class

(Qt3DRender::QForwardRenderer)

The Qt3DRender::QForwardRenderer provides a default FrameGraph implementation of a forward renderer. More...

Header: #include <QForwardRenderer>
qmake: QT += 3drender
Since: Qt 5.5
Inherits: Qt3DRender::QTechniqueFilter

Properties

Public Functions

QForwardRenderer(Qt3DCore::QNode *parent = Q_NULLPTR)
~QForwardRenderer()
Qt3DCore::QEntity *camera() const
QColor clearColor() const
QRectF viewportRect() const

Public Slots

void setCamera(Qt3DCore::QEntity *camera)
void setClearColor(const QColor &clearColor)
void setViewportRect(const QRectF &viewportRect)

Signals

void cameraChanged(Qt3DCore::QEntity *camera)
void clearColorChanged(const QColor &clearColor)
void viewportRectChanged(const QRectF &viewportRect)

Additional Inherited Members

Detailed Description

The Qt3DRender::QForwardRenderer provides a default FrameGraph implementation of a forward renderer.

Forward rendering is how OpenGL is traditionally. 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::QClearBuffer. 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.

By default the viewport occupies the whole screen and the clear color is white. Frustum culling is also enabled.

Property Documentation

camera : Qt3DCore::QEntity *

Holds the current QEntity camera used to render the scene.

Note: A camera is a QEntity that has a QCameraLens as one of its components.

Access functions:

Qt3DCore::QEntity *camera() const
void setCamera(Qt3DCore::QEntity *camera)

Notifier signal:

void cameraChanged(Qt3DCore::QEntity *camera)

clearColor : QColor

Holds the current clearColor.

Access functions:

QColor clearColor() const
void setClearColor(const QColor &clearColor)

Notifier signal:

void clearColorChanged(const QColor &clearColor)

viewportRect : QRectF

Holds the current viewport rect.

Access functions:

QRectF viewportRect() const
void setViewportRect(const QRectF &viewportRect)

Notifier signal:

void viewportRectChanged(const QRectF &viewportRect)

Member Function Documentation

QForwardRenderer::QForwardRenderer(Qt3DCore::QNode *parent = Q_NULLPTR)

Default constructs an instance of QForwardRenderer.

QForwardRenderer::~QForwardRenderer()

Destroys the QForwardRenderer instance.

[slot] void QForwardRenderer::setCamera(Qt3DCore::QEntity *camera)

Sets the camera which should be used to render the scene to camera.

Note: A camera is a QEntity having a QCameraLens as one of its components.

Note: Setter function for property camera.

See also camera().

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.