CullFace QML Type

The CullFace type specifies whether front or back face culling is enabled. 更多...

import 語句: import Qt3D.Render 2.0
Since: Qt 5.7
實例化: QCullFace
繼承: RenderState

特性

詳細描述

CullFace sets whether the front or back facets are culled. Facets include triangles, quadrilaterals, polygons and rectangles.

It can be added to the renderStates property of a RenderPass :

RenderPass {
    shaderProgram: ShaderProgram {
        // ...
    }
    renderStates: [
        CullFace {
            mode: CullFace.Front
        }
    ]
}
					

Or added to the renderStates property of a RenderStateSet :

RenderStateSet {
    renderStates: [
        CullFace {
            mode: CullFace.Front
        }
    ]
}
					

另請參閱 FrontFace .

特性文檔編製

mode : enumeration

Holds the culling mode used by CullFace . Default is set to QCullFace.Back.

  • CullFace .NoCulling - culling is disabled
  • CullFace .Front - culling is enabled for front facing polygons
  • CullFace .Back - culling is enabled for back facing polygons
  • CullFace .FrontAndBack - culling is enabled for all polygons, but points and lines are drawn