LibGame v0.4.0
The LG Game Engine - Copyright (C) 2024-2026 ETMSoftware
Loading...
Searching...
No Matches
lg_obj_parser.h
1/*
2 * LibGame - Copyright (C) Emmanuel Thomas-Maurin 2011-2026
3 * All rights reserved
4 */
5
6#ifndef LG_OBJ_PARSER_H
7#define LG_OBJ_PARSER_H
8
9#define SPATIAL_COORD_HUGE_VALUE (10e9) /* = 1 000 000 000.0 - OK ? */
10
11#define OBJPARSER_BBOX_COLOR "purple"
12
13typedef enum {
14 WITH_COORDS_ONLY,
15 WITH_TEXCOORDS,
16 WITH_NORMALS,
17 WITH_TEXCOORDS_AND_NORMALS
18} lg_vertex_type;
19
20LG_Mesh *lg_obj2vbo(const char *, FILE *, zboolean, zboolean, zboolean, zboolean, int);
21
22int lg_mtl_parser(const char *, LG_Material *[]);
23
24int lg_vertex_cmp(Vertex_uv_n *, Vertex_uv_n *, zboolean, zboolean);
25
26void lg_vbo_and_ibo_info(Vertex_uv_n *, uint32_t *, uint32_t, uint32_t, lg_vertex_type, int);
27
28void lg_vb_info(Vertex *, uint32_t, int, const char *, zboolean);
29
30void lg_vb_rgba_info(Vertex_rgba *, uint32_t, int, const char *, zboolean);
31
33
34#endif /* LG_OBJ_PARSER_H */
void lg_vb_rgba_info(Vertex_rgba *vb_data, uint32_t vb_size, int n_lines_max, const char *line_start, zboolean is_triangle_mesh)
Definition lg_obj_parser.c:931
LG_Mesh * lg_obj2vbo(const char *obj_relative_path, FILE *stream, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_obj_parser.c:152
void lg_vb_info(Vertex *vb_data, uint32_t vb_size, int n_lines_max, const char *line_start, zboolean is_triangle_mesh)
Definition lg_obj_parser.c:886
zboolean lg_objparser_check_consistency()
Definition lg_obj_parser.c:985
int lg_mtl_parser(const char *mtl_file, LG_Material *mat[])
Definition lg_obj_parser.c:670
int lg_vertex_cmp(Vertex_uv_n *v1, Vertex_uv_n *v2, zboolean tex_coords, zboolean normals)
Definition lg_obj_parser.c:750
void lg_vbo_and_ibo_info(Vertex_uv_n *vbo_data, uint32_t *ibo_data, uint32_t vbo_size, uint32_t ibo_size, lg_vertex_type vertex_type, int n_lines_max)
Definition lg_obj_parser.c:798
Definition lg_mesh.h:37
Definition lg_mesh.h:84
Definition lg_vertex.h:80
Definition lg_vertex.h:46
Definition lg_vertex.h:16