 |
LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
|
9 #define LG_MESH_NAME_MAX_LEN (64 - 1)
10 #define MAT_NAME_MAX_LEN (64 - 1)
11 #define N_MAX_MAT_PER_OBJ 64
12 #define N_MAX_USEMTL_PER_OBJ 256
14 #define LG_FLOAT_EPSILON (1e-6)
16 #define LG_VBO_CACHE "vbo_cache"
17 #define MAX_FILE_EXT_LEN 64
18 #define LG_MESH_INFO_EXT ".info"
19 #define LG_MESH_VBO_EXT ".vbo"
20 #define LG_MESH_IBO_EXT ".ibo"
22 #define LG_OBJ_CACHE "obj_cache"
24 #define LG_OBJ_FILE_MAXSIZE ((size_t)50 * (size_t)(1024 * 1024))
26 #define CHECK_PATH(_z_) INFO_OUT("DEBUG: [%s %d]: %s() -> %s\n", basename2(__FILE__), __LINE__, __func__, _z_)
28 #define LG_MESH_IS_RH 1
29 #define LG_MESH_IS_LH 2
41 char name[MAT_NAME_MAX_LEN + 1];
44 char tex_path[LG_TEX_PATH_MAX_LEN + 1];
75 char name[LG_MESH_NAME_MAX_LEN + 1];
92 char mtl_file[LG_MESH_NAME_MAX_LEN + 1];
99 zboolean xyz_normalized;
101 zboolean horiz_centered;
102 zboolean vert_centered;
103 zboolean vert_bottom;
106 LG_Mesh *
lg_load_vbo(
const char *, zboolean, zboolean, zboolean, zboolean, zboolean, zboolean);
Definition: lg_3d_primitives.h:64
void * lg_obj_file_open_from_cache(const char *file_name)
Definition: lg_mesh.c:349
int lg_vbo_load_from_file(const char *path, LG_Mesh **mesh)
Definition: lg_mesh.c:420
Definition: lg_vertex.h:46
Definition: lg_3d_primitives.h:53
LG_Mesh * lg_mesh_new_from_fbxfile(const char *path, zboolean invert_z, zboolean do_normalize_xyz, zboolean do_horiz_center, zboolean do_vert_center, zboolean do_vert_bottom)
Definition: lg_mesh.c:203
void lg_mesh_free(LG_Mesh *mesh)
Definition: lg_mesh.c:213
int lg_obj_file_save_to_cache(void *asset_buf, const char *file_name, size_t size, size_t *written_size)
Definition: lg_mesh.c:318
LG_Mesh * lg_mesh_new_from_objfile(const char *path, zboolean invert_z, zboolean do_normalize_xyz, zboolean do_horiz_center, zboolean do_vert_center, zboolean do_vert_bottom)
Definition: lg_mesh.c:133
int lg_mesh_reload_mats(LG_Mesh *mesh)
Definition: lg_mesh.c:497
LG_Mesh * lg_load_vbo(const char *path, zboolean force_reload_obj, zboolean invert_z, zboolean do_normalize_xyz, zboolean do_horiz_center, zboolean do_vert_center, zboolean do_vert_bottom)
Definition: lg_mesh.c:89
void lg_mesh_info(LG_Mesh *mesh)
Definition: lg_mesh.c:238
Definition: lg_textures.h:42
int lg_vbo_save_to_file(const char *path, LG_Mesh *mesh)
Definition: lg_mesh.c:374
Definition: lg_vertex.h:62