IPrimitiveRenderer

Description

interface Tinman.Terrain.Rendering.IPrimitiveRenderer

Extended by

PrimitiveRenderer abstract

Base interface for classes that provide methods for drawing graphic primitives (both indexed and non-indexed) and for dispatching general-purpose computational work.

Public / Methods

Draw


public method Draw → (2)

firstVertex in : int32

First vertex to draw.

vertexCount in : int32

The number of vertices to draw (not ! primitive count).

Draws primitives.

The vertices are stored in a IVertexBuffer object. The application is responsible for setting the proper render states.

Draw​Indexed


public method DrawIndexed → (3)

firstIndex in : int32

First vertex index to draw.

indexCount in : int32

The number of vertex indices to draw (not ! primitive count).

zeroVertex opt : int32 = 0

The value to add to resolved vertex indices (see CanUseZeroVertex).

Draws indexed primitives.

The vertex indices of the primitive are stored in an IIndexBuffer object, the vertices are stored in a IVertexBuffer object. The application is responsible for setting the proper render states.

Exactly indexCount in indices will read from the index buffer, starting at the buffer index firstIndex in (not ! byte offset).

Draw​Indirect


public method DrawIndirect → (2)

first in : int32

Index of first element in Buffer to draw.

count in : int32

Number of elements in Buffer to draw.

Draws indexed primitives indirectly from the current draw buffer (see Buffer).

This methods returns silently if Buffer is null or if CanDrawIndirect returns false.

Reset


public method Reset → ()

Resets this primitive renderer object to its default state.

Public / Attributes

Buffer


public attribute Buffer → (get,set)

value : IGpuBuffer

The buffer or null if CanDrawIndirect returns false.

The buffer to use for drawing primitives indirectly.

The element size and layout of the buffer is defined by the underlying graphics API and is usually populated by GPU programs. Please refer to the documentation of the respective subclass for details.

Can​Draw​Indirect


public attribute CanDrawIndirect → (get)

value : bool

true if DrawIndirect may be used,
false if not.

Can primitives be rendered indirectly from the current draw buffer (see Buffer)?

Can​Draw​Patches


public attribute CanDrawPatches → (get)

value : bool

true if tessellated patches can be drawn,
false if not.

Can patches for hardware tessellation on the GPU be drawn?

Can​Restart​Primitive


public attribute CanRestartPrimitive → (get)

value : bool

true if primitives can be restarted,
false if not.

Can primitives be restarted by inserting a special index (~0) into the stream?

Can​Use​Zero​Vertex


public attribute CanUseZeroVertex → (get)

value : bool

true if a base vertex may be used for indexed geometry,
false if a base vertex cannot be used.

Can a base vertex been specified when rendering indexed geometry?

Patches


public attribute Patches → (get,set)

value : bool

true when drawing tessellated patches,
false when drawing regular primitives or if CanDrawPatches returns false.

Draw patches for hardware tessellation on the GPU, instead of regular primitives?

Defaults to false.

Type


public attribute Type → (get,set)

value : Primitive

The graphics primitive.

Specifies the graphics primitive to use for subsequent draw calls.

Defaults to Primitive.PointList.