16#ifndef QGSFORWARDRENDERVIEW_H
17#define QGSFORWARDRENDERVIEW_H
23 class QRenderSettings;
25 class QSubtreeEnabler;
28 class QCameraSelector;
30 class QRenderTargetSelector;
33 class QFrustumCulling;
34 class QRenderStateSet;
99 Qt3DRender::QCamera *mMainCamera =
nullptr;
101 Qt3DRender::QCameraSelector *mMainCameraSelector =
nullptr;
102 Qt3DRender::QLayerFilter *mLayerFilter =
nullptr;
103 Qt3DRender::QRenderTargetSelector *mRenderTargetSelector =
nullptr;
106 Qt3DRender::QRenderStateSet *mClipRenderStateSet =
nullptr;
108 Qt3DRender::QLayer *mRenderLayer =
nullptr;
109 Qt3DRender::QLayer *mTransparentObjectsLayer =
nullptr;
110 Qt3DRender::QClearBuffers *mClearBuffers =
nullptr;
111 bool mFrustumCullingEnabled =
true;
112 Qt3DRender::QFrustumCulling *mFrustumCulling =
nullptr;
114 Qt3DRender::QTexture2D *mColorTexture =
nullptr;
115 Qt3DRender::QTexture2D *mDepthTexture =
nullptr;
117#if QT_VERSION >= QT_VERSION_CHECK( 5, 15, 0 )
118 Qt3DRender::QDebugOverlay *mDebugOverlay =
nullptr;
124 void buildRenderPasses();
129 Qt3DRender::QRenderTarget *buildTextures();
Base class for 3D render view.
Container class that holds different objects related to forward rendering.
Qt3DRender::QRenderTargetSelector * renderTargetSelector()
Returns current render target selector.
Qt3DRender::QLayer * renderLayer()
Returns a layer object used to indicate that the object is transparent.
void setClearColor(const QColor &clearColor)
Sets the clear color of the scene (background color)
Qt3DRender::QTexture2D * colorTexture() const
Returns forward color texture.
Qt3DRender::QLayer * transparentObjectLayer()
Returns a layer object used to indicate that the object is transparent.
void setDebugOverlayEnabled(bool enabled)
Sets whether debug overlay is enabled.
virtual void updateWindowResize(int width, int height) override
Called when 3D window is resized.
void setFrustumCullingEnabled(bool enabled)
Sets whether frustum culling is enabled.
bool isFrustumCullingEnabled() const
Returns whether frustum culling is enabled.
Qt3DRender::QTexture2D * depthTexture() const
Returns forward depth texture.
void addClipPlanes(int nrClipPlanes)
Setups nrClipPlanes clip planes in the forward pass to enable OpenGL clipping.
void removeClipPlanes()
Disables OpenGL clipping.