feat: OBJ model loader + fix mesh.h duplicates

- mesh_load_obj: parse vertices, UVs, faces from .obj files
- Auto-generate face normals
- Per-face vertex expansion (simple but correct)
This commit is contained in:
shuiyu1123 committed 2026-07-11 12:48:56 +08:00
1 parent d15a3947ab
commit ea3e0ab61c
2 files changed
+99

No files matched your search

+1
View File
@@ -20,5 +20,6 @@ typedef struct {
Mesh* mesh_create_cube(ID3D11Device* dev);
Mesh* mesh_create_plane(ID3D11Device* dev, float size);
Mesh* mesh_create_sphere(ID3D11Device* dev, float r, int seg);
Mesh* mesh_load_obj(ID3D11Device* dev, const char* path);
void mesh_destroy(Mesh* m);
void mesh_draw(Mesh* m, ID3D11DeviceContext* ctx);