~vladh/peony

peony/src/constants.hpp -rw-r--r-- 2.9 KiB
7fc9922bVlad-Stefan Harbuz changes shaders namespace into class a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
  Peony Game Engine
  Copyright (C) 2020 Vlad-Stefan Harbuz <vlad@vladh.net>
  All rights reserved.
*/

#pragma once

#include "types.hpp"

// Math things
constexpr real32 PI32 = 3.14159265359f;
constexpr real64 PI = 3.14159265358979323846;

// Platform things
#if !defined(MAX_PATH)
  #if defined(PATH_MAX)
    #define MAX_PATH PATH_MAX
  #else
    #define MAX_PATH 260
  #endif
#endif

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || \
    defined(__NT__) || defined(__CYGWIN__) || defined(__MINGW32__)
  #define PLATFORM_WINDOWS
#elif defined(__APPLE__)
  #define PLATFORM_MACOS
  #define PLATFORM_POSIX
#elif defined(__linux__) || defined(__unix__)
  #define PLATFORM_UNIX
  #define PLATFORM_POSIX
#elif defined(__FreeBSD)
  #define PLATFORM_FREEBSD
  #define PLATFORM_POSIX
#else
  #error "Unknown platform"
#endif

// General options
#define USE_PRINT_FPS false
#define USE_TIMERS true
#define USE_MEMORY_DEBUG_LOGS false
#define USE_MEMORYPOOL_ITEM_DEBUG false

// Graphics options
#define TARGET_MONITOR 0
#define USE_FULLSCREEN true
#define USE_WINDOWED_FULLSCREEN true

#define USE_ANIMATION_DEBUG false
#define USE_SHADER_DEBUG false
#define USE_OPENGL_DEBUG false

#define USE_SHADOW_RENDERING true
#define USE_BLOOM true
#define USE_FOG false
#define USE_VSYNC false

#if defined(PLATFORM_WINDOWS)
  #define GRAPHICS_HIGH
#else
  #define GRAPHICS_LOW
#endif

// Constants
constexpr char WINDOW_TITLE[] = "peony";
constexpr char TEXTURE_DIR[] = "resources/textures/";
constexpr char MODEL_DIR[] = "resources/models/";
constexpr char FONTS_DIR[] = "resources/fonts/";
constexpr char SCENE_DIR[] = "data/scenes/";
constexpr char MATERIAL_FILE_DIRECTORY[] = "data/materials/";
constexpr char SHADER_COMMON_PATH[] = "src_shaders/common.glsl";
constexpr char SHADER_COMMON_FRAGMENT_PATH[] = "src_shaders/common_fragment.glsl";
constexpr char SHADER_DIR[] = "src_shaders/";
constexpr char DEFAULT_SCENE[] = "terraintest";
constexpr char SCENE_EXTENSION[] = ".peony_scene";
constexpr char MATERIAL_FILE_EXTENSION[] = ".peony_materials";
constexpr uint32 N_LOADING_THREADS = 5;
constexpr uint32 MAX_N_ENTITIES = 256;
constexpr uint32 MAX_N_MODELS = 128;
constexpr uint32 MAX_N_ANIMATED_MODELS = 128;
constexpr uint32 MAX_DEBUG_NAME_LENGTH = 256;
constexpr uint32 MAX_GENEROUS_STRING_LENGTH = 512;
constexpr uint32 MAX_N_MESHES = 128;
constexpr uint32 MAX_N_MATERIALS = 256;
constexpr uint32 MAX_N_MATERIALS_PER_MODEL = 16;
constexpr uint32 MAX_UNIFORM_LENGTH = 256;
constexpr uint32 MAX_N_TEXTURE_POOL_SIZES = 6;
constexpr uint32 MAX_N_TEXTURES_PER_MATERIAL = 16;
constexpr uint8 MAX_N_UNIFORMS = 64;
constexpr uint8 MAX_UNIFORM_NAME_LENGTH = 64;
constexpr uint8 MAX_N_TEXTURE_UNITS = 80;
constexpr uint32 MAX_COMMON_NAME_LENGTH = 128;
constexpr uint32 MAX_N_BONES = 128;
constexpr uint32 MAX_N_BONES_PER_VERTEX = 4;
constexpr uint32 MAX_NODE_NAME_LENGTH = 32;
constexpr uint32 MAX_N_ANIMATIONS = 2;
constexpr uint32 MAX_N_ANIM_KEYS = 256;
constexpr uint16 MAX_N_LIGHTS = 8;