A constructor defined in BBMOD_VertexFormat.gml
new BBMOD_VertexFormat([_confOrVertices[, _normals[, _uvs[, _colors[, _tangentw[, _bones[, _ids]]]]]]])
A wrapper of a raw GameMaker vertex format.
Name | Type | Description |
---|---|---|
_confOrVertices | Struct, Bool |
Either a struct with keys called after properties of BBMOD_VertexFormat and values true or false , depending on whether the vertex format should have the property, or true , since every vertex format must have vertex positions. |
_normals | Bool |
If true then the vertex format must have normal vectors. Defaults to false . Used only if the first argument is not a struct. |
_uvs | Bool |
If true then the vertex format must have texture coordinates. Defaults to false . Used only if the first argument is not a struct. |
_colors | Bool |
If true then the vertex format must have vertex colors. Defaults to false . Used only if the first argument is not a struct. |
_tangentw | Bool |
If true then the vertex format must have tangent vectors and bitangent signs. Defaults to false . Used only if the first argument is not a struct. |
_bones | Bool |
If true then the vertex format must have vertex weights and bone indices. Defaults to false . Used only if the first argument is not a struct. |
_ids | Bool |
If true then the vertex format must have ids for dynamic batching. Defaults to false . Used only if the first argument is not a struct. |
Name | Description |
---|---|
Bones | If true then the vertex format has vertex weights and bone indices. |
Colors | If true then the vertex format has vertex colors. |
Ids | If true then the vertex format has ids for dynamic batching. |
Normals | If true then the vertex format has normal vectors. |
Raw | The raw vertex format. |
TangentW | If true then the vertex format has tangent vectors and bitangent sign. |
TextureCoords | If true then the vertex format has texture coordinates. |
TextureCoords2 | If true then the vertex format has a second texture coordinates layer. |
Vertices | If true then the vertex format has vertices. Should always be true ! |
Name | Description |
---|---|
get_byte_size | Retrieves the size of a single vertex using the vertex format in bytes. |
get_hash | Makes a hash based on the vertex format properties. Vertex buffers with same propereties will have the same hash. |
vformat = new BBMOD_VertexFormat({
Vertices: true,
Normals: true,
TextureCoords: true,
TextureCoords2: false,
Colors: true,
TangentW: true,
Bones: false,
Ids: false,
});
Copyright © 2024, BlueBurn. Built on September 07, 2024 using GMDoc.