Refactored.

This commit is contained in:
2021-04-22 13:55:34 +10:00
parent 5897c1045d
commit ea3e502524
62 changed files with 1033 additions and 1391 deletions

View File

@ -6,30 +6,7 @@
*/
#pragma once
#include <stdint.h>
#include <glad/glad.h>
#include <malloc.h>
#define PRIMITIVE_POSITIONS_PER_VERTICE 3
#define PRIMITIVE_COORDINATES_PER_VERTICE 2
/** Structure containing information about a primitive */
typedef struct {
int32_t verticeCount;
int32_t indiceCount;
GLuint vertexBuffer;
GLuint indexBuffer;
} primitive_t;
/** Structure containing vertice position information */
typedef struct {
float x, y, z;
float u, v;
} vertice_t;
/** Indice that references a specific vertice */
typedef unsigned int indice_t;
#include <dawn/dawn.h>
/**
* Creates a new primitive.