summaryrefslogtreecommitdiff
path: root/src/extend/mesh.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-07-19 17:01:00 +0800
committerchai <chaifix@163.com>2020-07-19 17:01:00 +0800
commit5b89a0fab0a46764c92979797681bf170125a7da (patch)
tree753d40800dc7dc423bd89e429e6154ca8441d654 /src/extend/mesh.h
parent4deff343b5fd928ae9475eedcf9b6add34b31ae2 (diff)
*early back face culling
Diffstat (limited to 'src/extend/mesh.h')
-rw-r--r--src/extend/mesh.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/extend/mesh.h b/src/extend/mesh.h
index d7a519e..6e58a9d 100644
--- a/src/extend/mesh.h
+++ b/src/extend/mesh.h
@@ -2,27 +2,27 @@
#define _SOFTSHADEROOM_MESH_H_
#include "../core/vert.h"
-/*
+
typedef struct {
- Vertex* vertices;
- uint vert_count;
- uint* triangles;
+ uint* triangles; // indices of vertex
uint tris_count;
- const char* name;
+ char name[32];
} SubMesh;
-*/
+
typedef struct {
Vertex* vertices;
uint vert_count;
- uint* triangles;
+ // map to first submesh
+ uint* triangles;
uint tris_count;
- //const char* name;
- /*
+ char name[32];
+ // submeshs
SubMesh* submesh;
uint submesh_count;
- */
} Mesh;
Mesh* mesh_loadfromobj(const char* path);
+void free_mesh(Mesh* mesh);
+
#endif \ No newline at end of file