- Qt 6.10
- Qt 3D
- QML Types
- Qt3D.Render (Deprecated)
- GeometryRenderer
- Qt 6.10.3 Reference Documentation

# GeometryRenderer QML Type

Encapsulates geometry rendering. More...

Import Statement: | `import Qt3D.Render 2.10`
In C++: | QGeometryRenderer
Inherits: | BoundingVolume
Status: | Deprecated

- List of all members, including inherited members

## Properties

- firstInstance : int
- firstVertex : int
- geometry : Geometry
- indexBufferByteOffset : int
- indexOffset : int
- instanceCount : int
- primitiveRestartEnabled : bool
- primitiveType : enumeration
- restartIndexValue : int
- sortIndex : real `(since 6.0)`
- vertexCount : int
- verticesPerPatch : int

## Detailed Description

A GeometryRenderer holds all the information necessary to draw a Geometry. A Geometry holds the coordinates of the geometry data - GeometryRenderer specifies how to interpret that data.

## Property Documentation

firstInstance : int

Holds the base instance.

firstVertex : int

Holds the first vertex.

geometry : Geometry

Holds the geometry.

indexBufferByteOffset : int

Holds the byte offset into the index buffer.

indexOffset : int

Holds the base vertex.

instanceCount : int

Holds the instance count.

primitiveRestartEnabled : bool

Holds the primitive restart flag.

primitiveType : enumeration

Holds the primitive type.

- QGeometryRenderer.Points
- QGeometryRenderer.Lines
- QGeometryRenderer.LineLoop
- QGeometryRenderer.LineStrip
- QGeometryRenderer.Triangles
- QGeometryRenderer.TriangleStrip
- QGeometryRenderer.TriangleFan
- QGeometryRenderer.LinesAdjacency
- QGeometryRenderer.TrianglesAdjacency
- QGeometryRenderer.LineStripAdjacency
- QGeometryRenderer.TriangleStripAdjacency
- QGeometryRenderer.Patches

See also Qt3DRender::QGeometryRenderer::PrimitiveType.

restartIndexValue : int

Holds the restart index.

sortIndex : real `[since 6.0]`

Overrides the sorting index when depth sorting is enabled.

If depth sorting is enabled on the frame graph, the renderer will sort objects based on how far the center of the bounding volume is from the camera and render objects from the furthest to the closest.

This property can be used to override the depth index and precisely control the order in which objects are rendered. This is useful when all objects are at the same physical distance from the camera.

The actual values are not significant, only that they define an order to sort the objects. These are sorted such as the object with the smallest value is drawn first, then the second smallest, and so on.

Note: Setting this to -1.f will disable the explicit sorting for this entity and revert to using the distance from the center of the bounding volume.

This property was introduced in Qt 6.0.

See also SortPolicy.

vertexCount : int

Holds the vertex count.

verticesPerPatch : int

Holds vertices per patch.