In questa pagina

RenderStateSet QML Type

Il nodo RenderStateSet FrameGraph consente di specificare un insieme di oggetti “ RenderState ” da applicare durante l’esecuzione di un ramo del framegraph. Per saperne di più...

Import Statement: import Qt3D.Render 2.12
In C++: QRenderStateSet
Inherits:

FrameGraphNode

Status: Deprecated

Questo tipo è deprecato. Si sconsiglia vivamente di utilizzarlo nel nuovo codice.

Proprietà

Descrizione dettagliata

Gli stati impostati su un RenderStateSet vengono applicati a livello globale, a differenza degli stati specifici per materiale che possono essere impostati su un RenderPass. Per impostazione predefinita, un RenderStateSet vuoto comporta la disabilitazione di tutti gli stati di rendering al momento dell'esecuzione. L'aggiunta di uno stato RenderState abilita esplicitamente tale stato di rendering in fase di esecuzione.

Il RenderStateSet viene abilitato quando viene aggiunto al grafico dei fotogrammi attivo:

import Qt3D.Core 2.0
import Qt3D.Render 2.0
import Qt3D.Extras 2.0

Entity {
    id: rootNode
    components: [
        RenderSettings {
            activeFrameGraph: RenderSurfaceSelector {
                ClearBuffers {
                    buffers : ClearBuffers.ColorDepthBuffer

                    CameraSelector {
                        camera: Camera {
                            position: Qt.vector3d(10, 0, 0)
                            viewCenter: Qt.vector3d(0, 0, 0)
                        }
                        RenderStateSet {
                            renderStates: [
                                CullFace { mode: CullFace.Back }
                            ]
                        }
                    }
                }
            }
        }
    ]

    Entity {
        id: sphereEntity
        components: [
            GeometryRenderer { view: SphereMesh {} },
            PhongMaterial {}
        ]
    }
}

Vedi anche RenderState e RenderPass.

Documentazione delle proprietà

renderStates : list<RenderState>

Contiene l'elenco degli oggetti RenderState utilizzati dall'RenderStateSet.

© 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.