b3dCreateSurface

Creates a new empty surface on a mesh with independent vertex/index arrays and material. Takes mesh (surface-based mesh entity from b3dCreateMesh). Returns surface handle (0-based index) or -1 on failure.

3D Graphics

Parameters & Returns

Parameters

mesh Int

Returns

Int

Quick Summary

Creates a new empty surface on a mesh with independent vertex/index arrays and material. Takes mesh (surface-based mesh entity from b3dCreateMesh). Returns surface handle (0-based index) or -1 on failure.

Technical Exegesis...

Creates a new empty surface on a mesh with independent vertex/index arrays and material. Takes mesh (surface-based mesh entity from b3dCreateMesh). Returns surface handle (0-based index) or -1 on failure. Validates mesh exists, type is ENTITY_MESH, and is surface-based. Creates default Material3D (white base color 1,1,1,1, metallic=0, roughness=1, no emissive, no textures, name="Default_Procedural"). Adds material to g_materials array. Creates new Surface3D structure. Assigns material index to surface.

Example

Example.bam
; No example implemented yet