IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QForwardRenderer Class

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

This class was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QForwardRenderer Class

  • Header: QForwardRenderer

  • Since: Qt 5.7

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3dextras)

    target_link_libraries(mytarget PRIVATE Qt6::3dextras)

  • qmake: QT += 3dextras

  • Inherited By:

  • Instantiated By: qml-qt3d-extras-forwardrenderer.xml

  • Inherits: Qt3DRender::QTechniqueFilter

Detailed Description

Forward rendering is what OpenGL traditionally uses. It renders directly to the backbuffer one object at a time shading each one as it goes.

QForwardRenderer is a single leaf 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.

Property Documentation

 

[since 5.14] buffersToClear : Qt3DRender::QClearBuffers::BufferType

Holds the current buffers to be cleared. Default value is ColorDepthBuffer

This property was introduced in Qt 5.14.

Access functions:

  • buffersToClear() const

  • void setBuffersToClear(Qt3DRender::QClearBuffers::BufferType)

Notifier signal:

  • void buffersToClearChanged(Qt3DRender::QClearBuffers::BufferType)

camera : Qt3DCore::QEntity*

Holds the current camera entity used to render the scene.

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

Access functions:

  • *camera() const

  • void setCamera( *camera)

Notifier signal:

  • void cameraChanged( *camera)

clearColor : QColor

Holds the current clear color of the scene. The frame buffer is initialized to the clear color before rendering.

Access functions:

  • clearColor() const

  • void setClearColor(const &clearColor)

Notifier signal:

  • void clearColorChanged(const &clearColor)

externalRenderTargetSize : QSize

Contains the size of the external render target. External render targets are relevant when rendering does not target a window surface (as set in surface).

Access functions:

  • externalRenderTargetSize() const

  • void setExternalRenderTargetSize(const &size)

Notifier signal:

  • void externalRenderTargetSizeChanged(const &size)

frustumCulling : bool

Indicates if the renderer applies frustum culling to the scene.

Access functions:

  • bool isFrustumCullingEnabled() const

  • void setFrustumCullingEnabled(bool enabled)

Notifier signal:

  • void frustumCullingEnabledChanged(bool enabled)

gamma : float

Holds the gamma value the renderer applies to the scene.

Access functions:

  • float gamma() const

  • void setGamma(float gamma)

Notifier signal:

  • void gammaChanged(float gamma)

[since 5.15] showDebugOverlay : bool

If true, a debug overlay will be rendered over the scene. It will show detailed information about the runtime rendering state, let the user turn logging on and off, etc.

This property was introduced in Qt 5.15.

Access functions:

  • bool showDebugOverlay() const

  • void setShowDebugOverlay(bool showDebugOverlay)

Notifier signal:

  • void showDebugOverlayChanged(bool showDebugOverlay)

surface : QObject*

Holds the current render surface.

Access functions:

Notifier signal:

viewportRect : QRectF

Holds the current normalized viewport rectangle.

Access functions:

  • viewportRect() const

  • void setViewportRect(const &viewportRect)

Notifier signal:

  • void viewportRectChanged(const &viewportRect)

Obsolete Members for QForwardRenderer

The following members of class QForwardRenderer are deprecated. We strongly advise against using them in new code.

Obsolete Property Documentation

 
window : QObject*

This property is deprecated. We strongly advise against using it in new code.

Holds the current render surface.

Access functions:

Notifier signal:

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+