- Qt 5.15
- Qt 3D
- C++ Classes
- QRasterMode
- Qt 5.15.18 Reference Documentation

# QRasterMode Class

class Qt3DRender::QRasterMode

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

Header: | #include <QRasterMode>
qmake: | QT += 3drender
Since: | Qt 5.14
Instantiated By: | RasterMode
Inherits: | Qt3DRender::QRenderState

This class was introduced in Qt 5.14.

- List of all members, including inherited members

## Public Types

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

## Properties

- faceMode : FaceMode
- rasterMode : RasterMode

## Public Functions

FaceMode | faceMode() const
RasterMode | rasterMode() const

## Public Slots

void | setFaceMode(FaceMode faceMode)
void | setRasterMode(RasterMode rasterMode)

## Signals

void | faceModeChanged(FaceMode faceMode)
void | rasterModeChanged(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

Constant | Value | Description
--- | --- | ---
`Qt3DRender::QRasterMode::Front` | `0x0404` | Applies to front faces only
`Qt3DRender::QRasterMode::Back` | `0x0405` | Applies to back faces only
`Qt3DRender::QRasterMode::FrontAndBack` | `0x0408` | Applies to front and back faces

### enum QRasterMode::RasterMode

Enumeration for raster mode values

Constant | Value | Description
--- | --- | ---
`Qt3DRender::QRasterMode::Points` | `0x1B00` | Vertices at the start of an edge are drawn as points.
`Qt3DRender::QRasterMode::Lines` | `0x1B01` | Edges of a polygon are draw as line segments.
`Qt3DRender::QRasterMode::Fill` | `0x1B02` | Fills 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:

FaceMode | faceMode() const
void | setFaceMode(FaceMode faceMode)

Notifier signal:

void | faceModeChanged(FaceMode faceMode)

### rasterMode : RasterMode

Holds the raster mode to be used.

Access functions:

RasterMode | rasterMode() const
void | setRasterMode(RasterMode rasterMode)

Notifier signal:

void | rasterModeChanged(RasterMode rasterMode)