<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qforwardrenderer.cpp --> <title>QForwardRenderer Class | Qt 3D 5.9</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.9</td><td ><a href="qt3d-index.html">Qt 3D</a></td><td ><a href="qt3d-cpp.html">C++ Classes</a></td><td >QForwardRenderer</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#properties">Properties</a></li> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#public-slots">Public Slots</a></li> <li class="level1"><a href="#signals">Signals</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QForwardRenderer Class</h1> <span class="small-subtitle">(<a href="qt3dextras-qforwardrenderer.html">Qt3DExtras::QForwardRenderer</a>)<br/></span> <!-- $$$QForwardRenderer-brief --> <p>The <a href="qt3dextras-qforwardrenderer.html">QForwardRenderer</a> provides a default <a href="qt3drender-framegraph.html">FrameGraph</a> implementation of a forward renderer. <a href="#details">More...</a></p> <!-- @@@QForwardRenderer --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QForwardRenderer></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += 3dextras</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.7</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-qt3d-extras-forwardrenderer.html">ForwardRenderer</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qt3drender-qtechniquefilter.html">Qt3DRender::QTechniqueFilter</a></td></tr></table></div><ul> <li><a href="qt3dextras-qforwardrenderer-members.html">List of all members, including inherited members</a></li> <li><a href="qt3dextras-qforwardrenderer-obsolete.html">Obsolete members</a></li> </ul> <a name="properties"></a> <h2 id="properties">Properties</h2> <div class="table"><table class="propsummary"> <tr><td class="topAlign"><ul> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#camera-prop">camera</a></b> : Qt3DCore::QEntity *</li> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#clearColor-prop">clearColor</a></b> : QColor</li> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#externalRenderTargetSize-prop">externalRenderTargetSize</a></b> : QSize</li> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#frustumCulling-prop">frustumCulling</a></b> : bool</li> </ul></td><td class="topAlign"><ul> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#gamma-prop">gamma</a></b> : float</li> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#surface-prop">surface</a></b> : QObject *</li> <li class="fn"><b><a href="qt3dextras-qforwardrenderer.html#viewportRect-prop">viewportRect</a></b> : QRectF</li> </ul> </td></tr> </table></div> <ul> <li class="fn">3 properties inherited from <a href="qt3dcore-qnode.html#properties">Qt3DCore::QNode</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#QForwardRenderer">QForwardRenderer</a></b>(Qt3DCore::QNode *<i>parent</i> = nullptr)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#dtor.QForwardRenderer">~QForwardRenderer</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> Qt3DCore::QEntity *</td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#camera-prop">camera</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#clearColor-prop">clearColor</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#externalRenderTargetSize-prop">externalRenderTargetSize</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> float </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#gamma-prop">gamma</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#frustumCulling-prop">isFrustumCullingEnabled</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QObject *</td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#surface">surface</a></b>() const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#viewportRect-prop">viewportRect</a></b>() const</td></tr> </table></div> <ul> <li class="fn">6 public functions inherited from <a href="qt3drender-qtechniquefilter.html#public-functions">Qt3DRender::QTechniqueFilter</a></li> <li class="fn">1 public function inherited from <a href="qt3drender-qframegraphnode.html#public-functions">Qt3DRender::QFrameGraphNode</a></li> <li class="fn">11 public functions inherited from <a href="qt3dcore-qnode.html#public-functions">Qt3DCore::QNode</a></li> </ul> <a name="public-slots"></a> <h2 id="public-slots">Public Slots</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#camera-prop">setCamera</a></b>(Qt3DCore::QEntity *<i>camera</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#clearColor-prop">setClearColor</a></b>(const QColor &<i>clearColor</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#externalRenderTargetSize-prop">setExternalRenderTargetSize</a></b>(const QSize &<i>size</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#frustumCulling-prop">setFrustumCullingEnabled</a></b>(bool <i>enabled</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#gamma-prop">setGamma</a></b>(float <i>gamma</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#setSurface">setSurface</a></b>(QObject *<i>surface</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#viewportRect-prop">setViewportRect</a></b>(const QRectF &<i>viewportRect</i>)</td></tr> </table></div> <ul> <li class="fn">3 public slots inherited from <a href="qt3dcore-qnode.html#public-slots">Qt3DCore::QNode</a></li> </ul> <a name="signals"></a> <h2 id="signals">Signals</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#camera-prop">cameraChanged</a></b>(Qt3DCore::QEntity *<i>camera</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#clearColor-prop">clearColorChanged</a></b>(const QColor &<i>clearColor</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#externalRenderTargetSize-prop">externalRenderTargetSizeChanged</a></b>(const QSize &<i>size</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#frustumCulling-prop">frustumCullingEnabledChanged</a></b>(bool <i>enabled</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#gamma-prop">gammaChanged</a></b>(float <i>gamma</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#surfaceChanged">surfaceChanged</a></b>(QObject *<i>surface</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qt3dextras-qforwardrenderer.html#viewportRect-prop">viewportRectChanged</a></b>(const QRectF &<i>viewportRect</i>)</td></tr> </table></div> <ul> <li class="fn">4 signals inherited from <a href="qt3dcore-qnode.html#signals">Qt3DCore::QNode</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">1 protected function inherited from <a href="qt3drender-qframegraphnode.html#protected-functions">Qt3DRender::QFrameGraphNode</a></li> <li class="fn">2 protected functions inherited from <a href="qt3dcore-qnode.html#protected-functions">Qt3DCore::QNode</a></li> </ul> <a name="details"></a> <!-- $$$QForwardRenderer-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qt3dextras-qforwardrenderer.html">QForwardRenderer</a> provides a default <a href="qt3drender-framegraph.html">FrameGraph</a> implementation of a forward renderer.</p> <p>Forward rendering is what OpenGL traditionally uses. It renders directly to the backbuffer one object at a time shading each one as it goes.</p> <p><a href="qt3dextras-qforwardrenderer.html">QForwardRenderer</a> is a single leaf <a href="qt3drender-framegraph.html">FrameGraph</a> tree which contains a <a href="qt3drender-qviewport.html">Qt3DRender::QViewport</a>, a <a href="qt3drender-qcameraselector.html">Qt3DRender::QCameraSelector</a>, and a <a href="qt3drender-qclearbuffers.html">Qt3DRender::QClearBuffers</a>. The <a href="qt3dextras-qforwardrenderer.html">QForwardRenderer</a> 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.</p> <p>By default the viewport occupies the whole screen and the clear color is white. Frustum culling is also enabled.</p> </div> <!-- @@@QForwardRenderer --> <div class="prop"> <h2>Property Documentation</h2> <!-- $$$camera-prop$$$camera$$$setCameraQt3DCore::QEntity*$$$cameraChangedQt3DCore::QEntity* --> <h3 class="fn" id="camera-prop"><a name="camera-prop"></a><span class="name">camera</span> : <span class="type">Qt3DCore::QEntity</span> *</h3> <p>Holds the current camera entity used to render the scene.</p> <p><b>Note: </b>A camera is a QEntity that has a QCameraLens as one of its components.</p><p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> Qt3DCore::QEntity *</td><td class="memItemRight bottomAlign"><span class="name"><b>camera</b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCamera</b></span>(Qt3DCore::QEntity *<i>camera</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>cameraChanged</b></span>(Qt3DCore::QEntity *<i>camera</i>)</td></tr> </table></div> <!-- @@@camera --> <!-- $$$clearColor-prop$$$clearColor$$$setClearColorconstQColor&$$$clearColorChangedconstQColor& --> <h3 class="fn" id="clearColor-prop"><a name="clearColor-prop"></a><span class="name">clearColor</span> : <span class="type">QColor</span></h3> <p>Holds the current clear color of the scene. The frame buffer is initialized to the clear color before rendering.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> QColor </td><td class="memItemRight bottomAlign"><span class="name"><b>clearColor</b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setClearColor</b></span>(const QColor &<i>clearColor</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>clearColorChanged</b></span>(const QColor &<i>clearColor</i>)</td></tr> </table></div> <!-- @@@clearColor --> <!-- $$$externalRenderTargetSize-prop$$$externalRenderTargetSize$$$setExternalRenderTargetSizeconstQSize&$$$externalRenderTargetSizeChangedconstQSize& --> <h3 class="fn" id="externalRenderTargetSize-prop"><a name="externalRenderTargetSize-prop"></a><span class="name">externalRenderTargetSize</span> : <span class="type">QSize</span></h3> <p>Contains the size of the external render target. External render targets are relevant when rendering does not target a window surface (as set in <a href="qt3dextras-qforwardrenderer.html#surface">surface()</a>).</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>externalRenderTargetSize</b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setExternalRenderTargetSize</b></span>(const QSize &<i>size</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>externalRenderTargetSizeChanged</b></span>(const QSize &<i>size</i>)</td></tr> </table></div> <!-- @@@externalRenderTargetSize --> <!-- $$$frustumCulling-prop$$$isFrustumCullingEnabled$$$setFrustumCullingEnabledbool$$$frustumCullingEnabledChangedbool --> <h3 class="fn" id="frustumCulling-prop"><a name="frustumCulling-prop"></a><span class="name">frustumCulling</span> : <span class="type">bool</span></h3> <p>Indicates if the renderer applies frustum culling to the scene.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isFrustumCullingEnabled</b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFrustumCullingEnabled</b></span>(bool <i>enabled</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>frustumCullingEnabledChanged</b></span>(bool <i>enabled</i>)</td></tr> </table></div> <!-- @@@frustumCulling --> <!-- $$$gamma-prop$$$gamma$$$setGammafloat$$$gammaChangedfloat --> <h3 class="fn" id="gamma-prop"><a name="gamma-prop"></a><span class="name">gamma</span> : <span class="type">float</span></h3> <p>Holds the gamma value the renderer applies to the scene.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> float </td><td class="memItemRight bottomAlign"><span class="name"><b>gamma</b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setGamma</b></span>(float <i>gamma</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>gammaChanged</b></span>(float <i>gamma</i>)</td></tr> </table></div> <!-- @@@gamma --> <!-- $$$surface-prop$$$surface$$$setSurfaceQObject*$$$surfaceChangedQObject* --> <h3 class="fn" id="surface-prop"><a name="surface-prop"></a><span class="name">surface</span> : <span class="type">QObject</span> *</h3> <p>Holds the current render surface.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> QObject *</td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qt3dextras-qforwardrenderer.html#surface">surface</a></b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qt3dextras-qforwardrenderer.html#setSurface">setSurface</a></b></span>(QObject *<i>surface</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qt3dextras-qforwardrenderer.html#surfaceChanged">surfaceChanged</a></b></span>(QObject *<i>surface</i>)</td></tr> </table></div> <!-- @@@surface --> <!-- $$$viewportRect-prop$$$viewportRect$$$setViewportRectconstQRectF&$$$viewportRectChangedconstQRectF& --> <h3 class="fn" id="viewportRect-prop"><a name="viewportRect-prop"></a><span class="name">viewportRect</span> : <span class="type">QRectF</span></h3> <p>Holds the current normalized viewport rectangle.</p> <p><b>Access functions:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> QRectF </td><td class="memItemRight bottomAlign"><span class="name"><b>viewportRect</b></span>() const</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setViewportRect</b></span>(const QRectF &<i>viewportRect</i>)</td></tr> </table></div> <p><b>Notifier signal:</b></p> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>viewportRectChanged</b></span>(const QRectF &<i>viewportRect</i>)</td></tr> </table></div> <!-- @@@viewportRect --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QForwardRenderer[overload1]$$$QForwardRendererQt3DCore::QNode* --> <h3 class="fn" id="QForwardRenderer"><a name="QForwardRenderer"></a>QForwardRenderer::<span class="name">QForwardRenderer</span>(<span class="type">Qt3DCore::QNode</span> *<i>parent</i> = nullptr)</h3> <p>Default constructs an instance of QForwardRenderer.</p><!-- @@@QForwardRenderer --> <!-- $$$~QForwardRenderer[overload1]$$$~QForwardRenderer --> <h3 class="fn" id="dtor.QForwardRenderer"><a name="dtor.QForwardRenderer"></a>QForwardRenderer::<span class="name">~QForwardRenderer</span>()</h3> <p>Destroys the instance of QForwardRenderer.</p><!-- @@@~QForwardRenderer --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p> </div> </body> </html>