LibGame v0.4.0
The LG Game Engine - Copyright (C) 2024-2026 ETMSoftware
Loading...
Searching...
No Matches
lg_fbx_parser.c File Reference

Functions

LG_Meshlg_fbx2vbo (const char *fbx_full_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
 

Detailed Description

=== The FBX file parser ===

We use the excellent ufbx lib, by Samuli Raivio.

At the moment, the aim is to read skinned meshes, as OBJ files don't support them.

See: https://ufbx.github.io and https://github.com/ufbx/ufbx

Function Documentation

◆ lg_fbx2vbo()

LG_Mesh * lg_fbx2vbo ( const char *  fbx_full_path,
zboolean  invert_z,
zboolean  normalize_xyz,
zboolean  horiz_center,
zboolean  vert_center,
zboolean  vert_bottom 
)

Parse a FBX file to build a skinned mesh

Will create a Vertex_uvn_iw VBO (see lg_vertex.h)

Parameters
fbx_full_pathUser-provided full path to the FBX file
invert_zInvert z spatial coord (left_handed vs right_handed coords sys) - STILL EXPERIMENTAL
normalize_xyzNormalize spatial coords
horiz_centerCenter mesh horizontally
vert_centerCenter mesh vertically, if vert_bottom is not set
vert_bottomSet mesh origin vertically at bottom, override vert_center
Returns
The new mesh