This function returns a struct with information on a previously created vertex format.
Variable | Type | Description |
---|---|---|
stride | Real | The total size in bytes of a single vertex |
num_elements | Real | The number of elements (vertex attributes) in a single vertex |
elements | Array | An array of elements. Each array element is a struct containing the following: - usage (Vertex Usage Type Constant) - type (Vertex Data Type Constant) - size (Real) - offset (Real) |
vertex_format_get_info(format);
Argument | Type | Description |
---|---|---|
format | Vertex Format | The vertex format, as returned by vertex_format_end |
vertex_format_begin();
vertex_format_add_position_3d();
vertex_format_add_normal();
vertex_format_add_colour();
vertex_format_add_texcoord();
vertex_format_add_custom(vertex_type_float1, vertex_usage_texcoord);
vertex_format = vertex_format_end();
var _info = vertex_format_get_info(vertex_format);
show_debug_message(json_stringify(_info, true));
The above code first creates a custom vertex format and then gets the info using vertex_format_get_info. After that, the info is shown in a debug message.