voxel-engine/include/globals.hpp

25 lines
591 B
C++
Raw Permalink Normal View History

#ifndef GLOBALS_H
#define GLOBALS_H
#include "camera.hpp"
#include "chunk.hpp"
#ifdef GLOBALS_DEFINER
#define extr
#else
#define extr extern
#endif
2023-03-23 21:17:06 +01:00
#define RENDER_DISTANCE 16
extr Camera theCamera;
2023-04-09 21:44:17 +02:00
constexpr int chunks_volume = static_cast<int>(1.333333333333*M_PI*(RENDER_DISTANCE*RENDER_DISTANCE*RENDER_DISTANCE));
2023-07-18 20:03:59 +02:00
extr bool wireframe;
extr uint32_t MORTON_XYZ_ENCODE[CHUNK_SIZE][CHUNK_SIZE][CHUNK_SIZE];
extr uint32_t MORTON_XYZ_DECODE[CHUNK_VOLUME][3];
extr uint32_t HILBERT_XYZ_ENCODE[CHUNK_SIZE][CHUNK_SIZE][CHUNK_SIZE];
extr uint32_t HILBERT_XYZ_DECODE[CHUNK_VOLUME][3];
2023-03-23 21:17:06 +01:00
#endif