nicegraf
ngf_vertex_attrib_desc Struct Reference

Data Fields

uint32_t location
 
uint32_t binding
 
uint32_t offset
 
ngf_type type
 
uint32_t size
 
bool normalized
 

Detailed Description

Specifies information about a vertex attribute.

Field Documentation

◆ binding

uint32_t ngf_vertex_attrib_desc::binding

The index of the vertex attribute buffer binding to use.

◆ location

uint32_t ngf_vertex_attrib_desc::location

Attribute index.

◆ normalized

bool ngf_vertex_attrib_desc::normalized

Whether the vertex stage sees the raw or normalized values for the attribute components. Only attribute components of types NGF_TYPE_INT8, NGF_TYPE_UINT8, NGF_TYPE_INT16 and NGF_TYPE_UINT16 can be normalized. For signed types, the values are scaled to the [-1; 1] floating point range, for unsigned types they are scaled to [0; 1].

◆ offset

uint32_t ngf_vertex_attrib_desc::offset

Offset in the buffer at which attribute data starts.

◆ size

uint32_t ngf_vertex_attrib_desc::size

Number of attribute components. This value has to be between 1 and 4 (inclusive).

◆ type

ngf_type ngf_vertex_attrib_desc::type

Type of attribute component.