Dawn/include/dawn/display/primitive.h
2021-04-22 13:55:34 +10:00

30 lines
646 B
C

/**
* 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 {
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;