Skip to content

FlipMesh

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

FlipMesh

FlipMesh:Void mesh:Int32
Parameter Mode Type Default Description
mesh In Int32 required Mesh handle.

Description

Turns every triangle of a mesh around so that it faces the other way. Triangles are only drawn from the side they face, so a sphere made as a sky has to be flipped to be seen from inside. Flipping also turns the lighting normals around. If you need a mesh visible from both sides, copy it with CopyMesh, flip the copy and merge both with AddMesh, or just draw both sides with the 16 flag of EntityFX, which is cheaper.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
light = CreateLight()
sky = CreateSphere(16)
ScaleEntity sky, 50, 50, 50
FlipMesh sky
EntityFX sky, 1
EntityColor sky, 90, 150, 230
; The camera is inside the sphere and can only see it because it was flipped.
box = CreateCube()
PositionEntity box, 0, 0, 5
RenderWorld
Flip
WaitKey

Media

FlipMesh

Related Commands

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

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally