Primitive3D Module
Pre-generated primitive meshes for 3D rendering. Generated once at module initialization to avoid runtime mesh generation overhead.
Use these with ForwardPbrPipeline
instead of calling Raylib.DrawSphere, Raylib.DrawCube, etc.
This ensures the active pipeline's shader is bound, not raylib's default shader.
Functions and values
| Function or value |
Description
|
A unit cone mesh (radius 1, height 1, 32 segments).
|
|
A unit cube mesh (1x1x1).
|
|
A unit cylinder mesh (radius 1, height 1, 32 segments).
|
|
A unit plane mesh (1x1, 1x1 subdivisions).
|
|
A unit sphere mesh (radius 1, 32x32 segments).
|
|
A torus mesh (inner radius 0.5, outer radius 1, 32x32 segments).
|
Mibo.Raylib