Skip to content

CreateMesh

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
Blitz3D

CreateMesh

CreateMesh:Int32 parent:Int32=0
Parameter Mode Type Default Description
parent In Int32 0 Entity the mesh follows, or 0 for none. Defaults to 0.

Returns: The handle of the new mesh.

Description

Creates an empty mesh with no surfaces, vertices or triangles. Fill it with CreateSurface, AddVertex and AddTriangle to build your own geometry, or with AddMesh to put other meshes together.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 0, -4
light = CreateLight()
RotateEntity light, 20, 20, 0
mesh = CreateMesh()
surf = CreateSurface(mesh)
a = AddVertex(surf, -1.5, -1, 0)
b = AddVertex(surf, 0, 1.2, 0)
c = AddVertex(surf, 1.5, -1, 0)
AddTriangle surf, a, b, c
UpdateNormals mesh
EntityColor mesh, 240, 120, 80
EntityFX mesh, 16
RenderWorld
Flip
WaitKey

Media

CreateMesh

Related Commands

AddMesh, CopyMesh, FitMesh, FlipMesh, LoadAnimMesh, LoadMesh, PaintMesh, PositionMesh

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally