first commit

This commit is contained in:
2024-09-16 13:13:56 +02:00
commit ddd25a798e
245 changed files with 46862 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#include "vector.h"
typedef struct {
float x, y, z;
float nx, ny, nz;
float tx, ty;
} Vertex;
typedef struct {
Vertex *data;
int size;
int capacity;
} VertexArray;
void append_vertex(VertexArray *array, Vertex v);
VertexArray make_sphere_mesh(float radius);
VertexArray make_sphere_mesh_2(float radius, int num_segms, bool fake_normals);
VertexArray make_cube_mesh(void);
bool load_mesh_from_file(const char *file, VertexArray *result);