diff options
Diffstat (limited to 'src/obj.h')
-rw-r--r-- | src/obj.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/obj.h b/src/obj.h new file mode 100644 index 0000000..864910f --- /dev/null +++ b/src/obj.h @@ -0,0 +1,26 @@ +# ifndef __OBJ__ +#define __OBJ__ + +#define OBJ_LINE_MAX_SIZE 1024 + +typedef struct { + float position[3]; + float normal[3]; + float texCoords[2]; +} Vertex; + +typedef struct { + unsigned int id; + char type[50]; +} Texture; + +typedef struct { + Vertex *vertices; + Texture *textures; + unsigned int *indices; + unsigned int indexSize, vertexSize; + unsigned int VAO, EBO, VBO; +} Mesh; + +Mesh * objCreateMesh(const char *filename); +# endif |