PySide6.Qt3DRender.Qt3DRender.QRenderStateSet¶
- class QRenderStateSet¶
- The - QRenderStateSet- FrameGraphnode offers a way of specifying a set of- QRenderStateobjects to be applied during the execution of a framegraph branch. More…- Synopsis¶- Methods¶- def - __init__()
- def - addRenderState()
- def - renderStates()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- States set on a - QRenderStateSetare set globally, contrary to the per-material states that can be set on a- QRenderPass. By default, an empty- QRenderStateSetwill result in all render states being disabled when executed. Adding a- QRenderStatestate explicitly enables that render state at runtime.- The RenderStateSet is enabled when added to the active frame graph: - // using namespace Qt3DRender; Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity(); QRenderSettings *renderSettings = new QRenderSettings(); QViewport *viewport = new QViewport(); QCameraSelector *cameraSelector = new QCameraSelector(viewport); QClearBuffers *clearBuffers = new QClearBuffers(cameraSelector); clearBuffers->setBuffers(QClearBuffers::ColorDepthBuffer); QRenderStateSet *renderStateSet = new QRenderStateSet(cameraSelector); QCullFace *cullFace = new QCullFace(renderStateSet); cullFace->setMode(QCullFace::Front); renderStateSet->addRenderState(cullFace); renderSettings->setActiveFrameGraph(viewport); rootEntity->addComponent(renderSettings); - See also - QRenderState- QRenderPass- __init__([parent=None])¶
- Parameters:
- parent – - QNode
 
 - addRenderState(state)¶
- Parameters:
- state – - QRenderState
 
 - Adds a new - QRenderState- stateto the- QRenderStateSetinstance.- Note - Not setting any - QRenderStatestate on a- QRenderStateSetinstance implies all the render states will be disabled at render time.- removeRenderState(state)¶
- Parameters:
- state – - QRenderState
 
 - Removes the - QRenderState- statefrom the- QRenderStateSetinstance.- renderStates()¶
- Return type:
- .list of Qt3DRender.QRenderState 
 
 - Returns the list of - QRenderStateobjects that compose the- QRenderStateSetinstance.