5#ifndef NNGN_RENDER_RENDER_H
6#define NNGN_RENDER_RENDER_H
8#include <unordered_set>
63 std::size_t
n(
void)
const;
103 bool sprites_updated,
bool screen_sprites_updated,
104 bool translucent_updated,
bool cubes_updated,
bool voxels_updated);
106 bool sprites_updated,
bool screen_sprites_updated,
bool cubes_updated,
107 bool voxels_updated);
132 std::vector<CubeRenderer>
cubes = {};
Rendering subsystem.
Definition render.h:37
u32 voxel_vbo
Definition render.h:143
bool set_max_cubes(std::size_t n)
Definition render.cpp:174
std::vector< VoxelRenderer > voxels
Definition render.h:133
std::vector< SpriteRenderer > screen_sprites
Definition render.h:130
std::unordered_set< const Renderer * > selections
Definition render.h:134
u32 translucent_ebo
Definition render.h:136
auto max_screen_sprites(void) const
Definition render.h:163
const Lighting * lighting
Definition render.h:127
u32 screen_sprite_debug_ebo
Definition render.h:140
bool update_debug(bool sprites_updated, bool screen_sprites_updated, bool cubes_updated, bool voxels_updated)
Definition render.cpp:911
u32 cube_debug_vbo
Definition render.h:142
u32 sprite_vbo
Definition render.h:137
u32 aabb_vbo
Definition render.h:148
bool set_max_sprites(std::size_t n)
Definition render.cpp:152
u32 selection_vbo
Definition render.h:147
Debug
Enabled debugging features.
Definition render.h:40
@ DEBUG_RENDERERS
Definition render.h:41
@ DEBUG_DEPTH
Definition render.h:45
@ DEBUG_ALL
Definition render.h:46
@ DEBUG_LIGHT
Definition render.h:44
@ DEBUG_BB
Definition render.h:43
@ DEBUG_CIRCLE
Definition render.h:42
Flags< Debug > m_debug
Definition render.h:120
u32 sphere_ebo
Definition render.h:152
u32 selection_ebo
Definition render.h:147
bool set_max_text(std::size_t n)
Definition render.cpp:194
const Map * map
Definition render.h:128
u32 textbox_vbo
Definition render.h:146
u32 lights_vbo
Definition render.h:153
void remove(Renderer *p)
Removes a renderer.
Definition render.cpp:682
const Fonts * fonts
Definition render.h:123
const Textbox * textbox
Definition render.h:124
auto max_cubes(void) const
Definition render.h:60
std::size_t n(void) const
Total number of active renderers.
Definition render.cpp:144
std::size_t n_translucent(void) const
Number of active translucent sprite renderers.
Definition render.h:69
auto debug(void) const
Definition render.h:54
u32 sprite_debug_ebo
Definition render.h:138
std::vector< SpriteRenderer > sprites
Definition render.h:129
std::size_t n_cubes(void) const
Number of active cube renderers.
Definition render.h:71
Textures * textures
Definition render.h:121
auto max_sprites(void) const
Definition render.h:57
void set_debug(Debug d)
Definition render.cpp:218
u32 textbox_ebo
Definition render.h:146
bool set_max_translucent(std::size_t n)
Definition render.cpp:166
u32 screen_sprite_debug_vbo
Definition render.h:140
std::vector< SpriteRenderer > translucent
Definition render.h:131
bool set_max_screen_sprites(std::size_t n)
Definition render.cpp:159
u32 sphere_vbo
Definition render.h:152
void remove_selection(const Renderer *p)
Definition render.cpp:717
bool update_renderers(bool sprites_updated, bool screen_sprites_updated, bool translucent_updated, bool cubes_updated, bool voxels_updated)
Definition render.cpp:745
u32 lights_ebo
Definition render.h:153
u32 bb_circle_vbo
Definition render.h:151
Flags< Flag > flags
Definition render.h:119
bool selected(const Renderer *p) const
Definition render.h:167
u32 cube_debug_ebo
Definition render.h:142
u32 aabb_ebo
Definition render.h:148
bool update(void)
Definition render.cpp:722
u32 screen_sprite_vbo
Definition render.h:139
u32 screen_sprite_ebo
Definition render.h:139
bool perspective(void) const
Definition render.h:159
u32 translucent_vbo
Definition render.h:136
bool set_max_voxels(std::size_t n)
Definition render.cpp:184
u32 voxel_debug_ebo
Definition render.h:144
u32 depth_cube_ebo
Definition render.h:156
auto max_translucent(void) const
Definition render.h:59
u32 text_ebo
Definition render.h:145
u32 depth_vbo
Definition render.h:155
u32 depth_ebo
Definition render.h:155
u32 aabb_circle_ebo
Definition render.h:149
u32 text_vbo
Definition render.h:145
void set_zsprites(bool z)
Definition render.cpp:235
const Grid * grid
Definition render.h:125
auto max_voxels(void) const
Definition render.h:61
u32 bb_circle_ebo
Definition render.h:151
bool zsprites(void) const
Definition render.h:56
std::size_t n_screen_sprites(void) const
Number of active screen sprite renderers.
Definition render.h:67
u32 sprite_ebo
Definition render.h:137
u32 range_ebo
Definition render.h:154
u32 depth_cube_vbo
Definition render.h:156
void add_selection(const Renderer *p)
Processes changed renderers/configuration and updates graphics.
Definition render.cpp:712
std::vector< CubeRenderer > cubes
Definition render.h:132
bool set_graphics(Graphics *g)
Associates this system with a graphics back end.
Definition render.cpp:246
u32 voxel_ebo
Definition render.h:143
u32 bb_ebo
Definition render.h:150
std::size_t n_sprites(void) const
Number of active sprite renderers.
Definition render.h:65
Graphics * graphics
Definition render.h:122
u32 sprite_debug_vbo
Definition render.h:138
u32 voxel_debug_vbo
Definition render.h:144
u32 bb_vbo
Definition render.h:150
Flag
Definition render.h:108
@ DEBUG_UPDATED
Definition render.h:114
@ ZSPRITES
Definition render.h:117
@ SCREEN_SPRITES_UPDATED
Definition render.h:110
@ SELECTION_UPDATED
Definition render.h:115
@ SPRITES_UPDATED
Definition render.h:109
@ VOXELS_UPDATED
Definition render.h:113
@ CUBES_UPDATED
Definition render.h:112
@ PERSPECTIVE
Definition render.h:116
@ TRANSLUCENT_UPDATED
Definition render.h:111
u32 aabb_circle_vbo
Definition render.h:149
const Colliders * colliders
Definition render.h:126
u32 cube_vbo
Definition render.h:141
u32 range_vbo
Definition render.h:154
u32 cube_ebo
Definition render.h:141
std::size_t n_voxels(void) const
Number of active voxel renderers.
Definition render.h:73
Texture manager, loads and caches image data from files/buffers.
Definition texture.h:34
set_max_colliders
Definition collision.lua:14
local c
Definition gamma.lua:11
local g
Definition gamma.lua:7
init
Definition img_common.lua:34
local l
Definition light.lua:23
std::uint16_t u16
Definition def.h:13
std::uint32_t u32
Definition def.h:14
std::uint8_t u8
Definition def.h:12
set_perspective
Definition camera.lua:51
load
Definition entity.lua:7
Definition collision.h:72
Wrapper for a small unsigned integral representing flags.
Definition flags.h:18
constexpr bool is_set(AT a) const
Definition flags.h:45
Definition graphics.h:138
Definition renderers.h:15
Non-owning reference to a table on the stack.
Definition table.h:166
Operations on table values.