Qt3DExtras::QForwardRenderer Class
class Qt3DExtras::QForwardRendererQForwardRenderer proporciona una implementación por defecto de FrameGraph de un renderizador hacia adelante. Más...
| Cabecera: | #include <QForwardRenderer> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras)target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| En QML: | ForwardRenderer |
| Hereda: | Qt3DRender::QTechniqueFilter |
| Status: | Obsoleto |
Propiedades
|
|
Funciones públicas
| Qt3DRender::QClearBuffers::BufferType | buffersToClear() const |
| Qt3DCore::QEntity * | camera() const |
| QColor | clearColor() const |
| QSize | externalRenderTargetSize() const |
| float | gamma() const |
| bool | isFrustumCullingEnabled() const |
| bool | showDebugOverlay() const |
| QObject * | surface() const |
| QRectF | viewportRect() const |
Ranuras públicas
| void | setBuffersToClear(Qt3DRender::QClearBuffers::BufferType) |
| void | setCamera(Qt3DCore::QEntity *camera) |
| void | setClearColor(const QColor &clearColor) |
| void | setExternalRenderTargetSize(const QSize &size) |
| void | setFrustumCullingEnabled(bool enabled) |
| void | setGamma(float gamma) |
| void | setShowDebugOverlay(bool showDebugOverlay) |
| void | setSurface(QObject *surface) |
| void | setViewportRect(const QRectF &viewportRect) |
Señales
| void | buffersToClearChanged(Qt3DRender::QClearBuffers::BufferType) |
| void | cameraChanged(Qt3DCore::QEntity *camera) |
| void | clearColorChanged(const QColor &clearColor) |
| void | externalRenderTargetSizeChanged(const QSize &size) |
| void | frustumCullingEnabledChanged(bool enabled) |
| void | gammaChanged(float gamma) |
| void | showDebugOverlayChanged(bool showDebugOverlay) |
| void | surfaceChanged(QObject *surface) |
| void | viewportRectChanged(const QRectF &viewportRect) |
Descripción detallada
El renderizado directo es lo que OpenGL utiliza tradicionalmente. Renderiza directamente al backbuffer un objeto a la vez sombreando cada uno a medida que avanza.
QForwardRenderer es un árbol FrameGraph de una sola hoja que contiene un Qt3DRender::QViewport, un Qt3DRender::QCameraSelector, y un Qt3DRender::QClearBuffers. El QForwardRenderer tiene una clave de filtro de requisitos por defecto cuyo nombre es "renderingStyle" y valor "forward". Si necesitas filtrar tus técnicas, deberías hacerlo basándote en esa clave de filtro.
Por defecto el viewport ocupa toda la pantalla y el color claro es el blanco. Frustum culling también está habilitado.
Documentación de propiedades
buffersToClear : Qt3DRender::QClearBuffers::BufferType
Contiene los buffers actuales a borrar. El valor por defecto es ColorDepthBuffer
Funciones de acceso:
| Qt3DRender::QClearBuffers::BufferType | buffersToClear() const |
| void | setBuffersToClear(Qt3DRender::QClearBuffers::BufferType) |
Señal del notificador:
| void | buffersToClearChanged(Qt3DRender::QClearBuffers::BufferType) |
camera : Qt3DCore::QEntity*
Contiene la cámara actual utilizada para renderizar la escena.
Nota: Una cámara es una QEntity que tiene una QCameraLens como uno de sus componentes.
Funciones de acceso:
| Qt3DCore::QEntity * | camera() const |
| void | setCamera(Qt3DCore::QEntity *camera) |
Señal notificadora:
| void | cameraChanged(Qt3DCore::QEntity *camera) |
clearColor : QColor
Mantiene el color actual de la escena. El búfer de fotogramas se inicializa con el color claro antes de la renderización.
Funciones de acceso:
| QColor | clearColor() const |
| void | setClearColor(const QColor &clearColor) |
Señal del notificador:
| void | clearColorChanged(const QColor &clearColor) |
externalRenderTargetSize : QSize
Contiene el tamaño del objetivo de renderizado externo. Los objetivos de renderizado externos son relevantes cuando el renderizado no tiene como objetivo una superficie de ventana (como se establece en surface).
Funciones de acceso:
| QSize | externalRenderTargetSize() const |
| void | setExternalRenderTargetSize(const QSize &size) |
Señal del notificador:
| void | externalRenderTargetSizeChanged(const QSize &size) |
frustumCulling : bool
Indica si el renderizador aplica frustum culling a la escena.
Funciones de acceso:
| bool | isFrustumCullingEnabled() const |
| void | setFrustumCullingEnabled(bool enabled) |
Señal del notificador:
| void | frustumCullingEnabledChanged(bool enabled) |
gamma : float
Mantiene el valor gamma que el renderizador aplica a la escena.
Funciones de acceso:
| float | gamma() const |
| void | setGamma(float gamma) |
Señal del notificador:
| void | gammaChanged(float gamma) |
showDebugOverlay : bool
Si es verdadero, se mostrará una superposición de depuración sobre la escena. Mostrará información detallada sobre el estado del renderizado en tiempo de ejecución, permitirá al usuario activar y desactivar el registro, etc.
Funciones de acceso:
| bool | showDebugOverlay() const |
| void | setShowDebugOverlay(bool showDebugOverlay) |
Señal del notificador:
| void | showDebugOverlayChanged(bool showDebugOverlay) |
surface : QObject*
Mantiene la superficie de renderizado actual.
Funciones de acceso:
| QObject * | surface() const |
| void | setSurface(QObject *surface) |
Señal del notificador:
| void | surfaceChanged(QObject *surface) |
viewportRect : QRectF
Mantiene el rectángulo normalizado actual de la ventana gráfica.
Funciones de acceso:
| QRectF | viewportRect() const |
| void | setViewportRect(const QRectF &viewportRect) |
Señal del notificador:
| void | viewportRectChanged(const QRectF &viewportRect) |
© 2026 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.