Debug Grid

This commit is contained in:
2021-05-09 19:45:57 -07:00
parent d6e3b4aad1
commit f81db1dcdc
7 changed files with 164 additions and 3 deletions

View File

@ -16,6 +16,7 @@
#include "display/texture.h"
#include "display/tileset.h"
#include "display/debug/grid.h"
#include "display/debug/position.h"
#include "display/gui/font.h"

View File

@ -0,0 +1,20 @@
/**
* 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;