Adding some comments.
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../../libs.h"
|
||||
|
||||
#define GRID_COLUMN_ROWS 100
|
||||
#define GRID_COLUMN_ROWS_SIZE 0.1
|
||||
|
||||
#define GRID_VERTICE_COUNT (GRID_COLUMN_ROWS+1) * (GRID_COLUMN_ROWS+1) * 3
|
||||
#define GRID_INDICE_COUNT GRID_COLUMN_ROWS * GRID_COLUMN_ROWS * 8
|
||||
|
||||
typedef struct {
|
||||
GLuint vertexBuffer;
|
||||
GLuint indexBuffer;
|
||||
} griddebug_t;
|
@ -13,16 +13,22 @@
|
||||
|
||||
/** 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;
|
||||
|
||||
|
@ -12,12 +12,16 @@
|
||||
* store the pixels in memory because we don't need to!
|
||||
*/
|
||||
typedef struct {
|
||||
/** Width (in pixels) of the texture */
|
||||
int32_t width;
|
||||
/** Height (in pixels) of the texture */
|
||||
int32_t height;
|
||||
/** Texture ID on the GPU */
|
||||
GLuint id;
|
||||
} texture_t;
|
||||
|
||||
/** Information about a single pixel. */
|
||||
typedef struct {
|
||||
/** RGBA Color values */
|
||||
uint8_t r, g, b, a;
|
||||
} pixel_t;
|
||||
|
Reference in New Issue
Block a user