]> git.lizzy.rs Git - shadowclad.git/blob - src/asset.h
Remove nonsense pointer comparison
[shadowclad.git] / src / asset.h
1 #ifndef ASSET_H_
2 #define ASSET_H_
3
4 #include <GL/gl.h>
5
6 #include "assimp_types.h"
7
8 #include "typedefs.h"
9
10 typedef struct Asset3D Asset3D;
11 typedef struct Mesh Mesh;
12 typedef struct Face Face;
13 typedef struct Material Material;
14
15 struct Asset3D {
16         unsigned int numMeshes;
17         Mesh* meshes;
18         unsigned int numMaterials;
19         Material* materials;
20 };
21
22 struct Mesh {
23         unsigned int numVertices;
24         Vector3D* vertices;
25         Vector3D* normals;
26         Vector3D* textureCoords;
27         unsigned int numFaces;
28         Face* faces;
29         unsigned int materialIndex;
30 };
31
32 struct Face {
33         unsigned int numIndices;
34         unsigned int* indices;
35 };
36
37 struct Material {
38         GLuint textureId;
39 };
40
41 const Asset3D* importAsset(const char* path);
42
43 #endif