QRasterMode Class

class Qt3DRender::QRasterMode

The QRasterMode render state allows to control the type of rasterization to be performed. More...

Header: #include <QRasterMode>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
Instantiated By: RasterMode
Inherits: Qt3DRender::QRenderState

Public Types

enum FaceMode { Front, Back, FrontAndBack }
enum RasterMode { Points, Lines, Fill }

Properties

Public Functions

Qt3DRender::QRasterMode::FaceMode faceMode() const
Qt3DRender::QRasterMode::RasterMode rasterMode() const

Public Slots

void setFaceMode(Qt3DRender::QRasterMode::FaceMode faceMode)
void setRasterMode(Qt3DRender::QRasterMode::RasterMode rasterMode)

Signals

void faceModeChanged(Qt3DRender::QRasterMode::FaceMode faceMode)
void rasterModeChanged(Qt3DRender::QRasterMode::RasterMode rasterMode)

Detailed Description

The QRasterMode class is used to control the rasterization step of the primitives at render time. This can be used to choose whether we only want to show points, edges or fill a primitive.

Note: This is not supported when rendering on OpenGL ES 2.0 platforms.

See also QAlphaTest and QStencilTest.

Member Type Documentation

enum QRasterMode::FaceMode

Enumeration for face mode values

ConstantValueDescription
Qt3DRender::QRasterMode::Front0x0404Applies to front faces only
Qt3DRender::QRasterMode::Back0x0405Applies to back faces only
Qt3DRender::QRasterMode::FrontAndBack0x0408Applies to front and back faces

enum QRasterMode::RasterMode

Enumeration for raster mode values

ConstantValueDescription
Qt3DRender::QRasterMode::Points0x1B00Vertices at the start of an edge are drawn as points.
Qt3DRender::QRasterMode::Lines0x1B01Edges of a polygon are draw as line segments.
Qt3DRender::QRasterMode::Fill0x1B02Fills the interior of the primitive.

Property Documentation

faceMode : FaceMode

Holds the face mode to be used. Controls on which face the raster mode is to be applied.

Access functions:

Qt3DRender::QRasterMode::FaceMode faceMode() const
void setFaceMode(Qt3DRender::QRasterMode::FaceMode faceMode)

Notifier signal:

void faceModeChanged(Qt3DRender::QRasterMode::FaceMode faceMode)

rasterMode : RasterMode

Holds the raster mode to be used.

Access functions:

Qt3DRender::QRasterMode::RasterMode rasterMode() const
void setRasterMode(Qt3DRender::QRasterMode::RasterMode rasterMode)

Notifier signal:

void rasterModeChanged(Qt3DRender::QRasterMode::RasterMode rasterMode)

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