vertex_format_add_custom()

From ENIGMA

Jump to: navigation, search

Description

Adds a custom attribute to the current vertex format being declared. This can be used to specify attributes in a custom way, as well as to specify custom attributes as part of the vertex data.

Parameters

Parameter Data Type Description
type integer The type of vertex attribute being added.
usage integer The usage of the vertex attribute being added.

Return Values

void: This function does not return anything.

Example Call

// demonstrates beginning and ending a new vertex format with custom attributes
vertex_format_begin();

// demonstrates adding multiple custom 3-component float texture attributes
vertex_format_add_custom(vertex_type_float3, vertex_usage_textcoord);
vertex_format_add_custom(vertex_type_float3, vertex_usage_textcoord);

// demonstrates adding a custom 4-component float position attribute (x, y, z, w)
vertex_format_add_custom(vertex_type_float4, vertex_usage_position);

vf_position_color = vertex_format_end();
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox