/** * Copyright (c) 2021 Dominic Masters * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #pragma once #include "../libs.h" #define PRIMITIVE_POSITIONS_PER_VERTICE 3 #define PRIMITIVE_COORDINATES_PER_VERTICE 2 /** Structure containing information about a primitive */ typedef struct { /** How many vertices are in the primitive */ int32_t verticeCount; /** How many indices are in the primitive */ int32_t indiceCount; /** Pointer to the vertex buffer on the GPU */ GLuint vertexBuffer; /** Pointer to the index buffer on the GPU */ GLuint indexBuffer; } primitive_t; /** Structure containing vertice position information */ typedef struct { /** Coordinates */ float x, y, z; /** Texture UVs */ float u, v; } vertice_t; /** Indice that references a specific vertice */ typedef unsigned int indice_t;