Diligent Engine API Reference
Public Types | Public Member Functions | Public Attributes | List of all members
Diligent::LayoutElement Struct Reference

Description of a single element of the input layout. More...

Public Types

enum  FREQUENCY : Int32 { FREQUENCY_UNDEFINED = 0, FREQUENCY_PER_VERTEX, FREQUENCY_PER_INSTANCE, FREQUENCY_NUM_FREQUENCIES }
 Input frequency. More...
 

Public Member Functions

 LayoutElement (Uint32 _InputIndex=0, Uint32 _BufferSlot=0, Uint32 _NumComponents=0, VALUE_TYPE _ValueType=VT_FLOAT32, Bool _IsNormalized=True, Uint32 _RelativeOffset=0, FREQUENCY _Frequency=FREQUENCY_PER_VERTEX, Uint32 _InstanceDataStepRate=1)
 Initializes the structure.
 

Public Attributes

Uint32 InputIndex
 Input index of the element, which is specified in the vertex shader.
 
Uint32 BufferSlot
 Buffer slot index that this element is read from.
 
Uint32 NumComponents
 Number of components in the element. Allowed values are 1, 2, 3, and 4.
 
VALUE_TYPE ValueType
 Type of the element components, see Diligent::VALUE_TYPE for details.
 
Bool IsNormalized
 For signed and unsigned integer value types (VT_INT8, VT_INT16, VT_INT32, VT_UINT8, VT_UINT16, VT_UINT32) indicates if the value should be normalized to [-1,+1] or [0, 1] range respectively. For floating point types (VT_FLOAT16 and VT_FLOAT32), this member is ignored.
 
Uint32 RelativeOffset
 Relative offset, in bytes, to the element bits. If this value is zero, the offset will be computed automatically assuming that all previous elements in the same buffer slot a tightly packed. Overlapping elements are not allowed.
 
Uint32 InstanceDataStepRate
 The number of instances to draw using the same per-instance data before advancing in the buffer by one element.
 

Detailed Description

Description of a single element of the input layout.

Member Enumeration Documentation

Input frequency.

Enumerator
FREQUENCY_UNDEFINED 

Frequency is undefined.

FREQUENCY_PER_VERTEX 

Input data is per-vertex data.

FREQUENCY_PER_INSTANCE 

Input data is per-instance data.

FREQUENCY_NUM_FREQUENCIES 

Helper value that stores the total number of frequencies in the enumeration.