CreateMesh()

Syntax

Result = CreateMesh(#Mesh, NbMaximumVertices)
Description
Creates a new empy #Mesh. If #PB_Any is used as '#Mesh' parameter, the new mesh number will be returned as 'Result'.

SetMeshData() can be used to build a mesh from scratch by inserting the vertices, normals, uv textures and more. 'NbMaximumVertices' has to be specified to tell up to how many vertices the #Mesh could have.

If the 'Result' is 0, the mesh creation has failed. If the #Mesh was already created, it is automatically freed and replaced by the new one.

Supported OS

Windows, Linux

<- CopyMesh() - Mesh Index - FreeMesh() ->