aboutsummaryrefslogtreecommitdiff
path: root/src/obj.h
blob: 864910f5d8eb3212730bdb0647c0a36442b57868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
Feel free to download, copy and edit any repo