|
bool | load_textures (std::uint32_t, std::uint32_t, const std::byte *) override |
|
Version | version () const override |
|
bool | init_backend () override |
|
bool | init_instance () override |
|
bool | init_device () override |
|
bool | init_device (std::size_t) override |
|
std::size_t | n_extensions () const override |
|
std::size_t | n_layers () const override |
|
std::size_t | n_devices () const override |
|
std::size_t | n_device_extensions (std::size_t) const override |
|
std::size_t | n_queue_families (std::size_t) const override |
|
std::size_t | n_present_modes () const override |
|
std::size_t | n_heaps (std::size_t) const override |
|
std::size_t | n_memory_types (std::size_t, std::size_t) const override |
|
std::size_t | selected_device () const override |
|
void | extensions (Extension *) const override |
|
void | layers (Layer *) const override |
|
void | device_infos (DeviceInfo *) const override |
|
void | device_extensions (std::size_t, Extension *) const override |
|
void | queue_families (std::size_t, QueueFamily *) const override |
|
SurfaceInfo | surface_info () const override |
|
void | present_modes (PresentMode *) const override |
|
void | heaps (std::size_t, MemoryHeap *) const override |
|
void | memory_types (std::size_t, std::size_t, MemoryType *) const override |
|
bool | error () override |
|
bool | window_closed () const override |
|
int | swap_interval () const override |
|
uvec2 | window_size () const override |
|
GraphicsStats | stats () override |
|
void | get_keys (size_t, int32_t *) const override |
|
ivec2 | mouse_pos (void) const override |
|
bool | set_n_frames (std::size_t) override |
|
bool | set_n_swap_chain_images (std::size_t) override |
|
void | set_swap_interval (int) override |
|
void | set_window_title (const char *) override |
|
void | set_cursor_mode (CursorMode) override |
|
void | set_size_callback (void *, size_callback_f) override |
|
void | set_key_callback (void *, key_callback_f) override |
|
void | set_mouse_button_callback (void *, mouse_button_callback_f) override |
|
void | set_mouse_move_callback (void *, mouse_move_callback_f) override |
|
void | resize (int, int) override |
|
void | set_camera (const Camera &) override |
|
void | set_lighting (const Lighting &) override |
|
void | set_camera_updated () override |
|
void | set_lighting_updated () override |
|
bool | set_shadow_map_size (uint32_t) override |
|
bool | set_shadow_cube_size (uint32_t) override |
|
void | set_automatic_exposure (bool) override |
|
void | set_exposure (float) override |
|
void | set_bloom_downscale (std::size_t) override |
|
void | set_bloom_threshold (float) override |
|
void | set_bloom_blur_size (float) override |
|
void | set_bloom_blur_passes (std::size_t) override |
|
void | set_bloom_amount (float) override |
|
void | set_blur_downscale (std::size_t) override |
|
void | set_blur_size (float) override |
|
void | set_blur_passes (std::size_t) override |
|
void | set_HDR_mix (float) override |
|
u32 | create_pipeline (const PipelineConfiguration &) override |
|
u32 | create_buffer (const BufferConfiguration &) override |
|
bool | set_buffer_capacity (u32, u64) override |
|
bool | set_buffer_size (u32, u64) override |
|
bool | write_to_buffer (u32 b, u64 offset, u64 n, u64 size, void *data, void f(void *, void *, u64, u64)) override |
|
bool | resize_textures (u32) override |
|
bool | resize_font (u32) override |
|
bool | load_font (unsigned char, u32, const nngn::uvec2 *, const std::byte *) override |
|
void | poll_events () const override |
|
bool | set_render_list (const RenderList &) override |
|
bool | render () override |
|
bool | vsync () override |
|
virtual bool | init () |
| Fully initialize the back end.
|
|
template<typename F > |
bool | write_to_buffer (u32 b, u64 offset, u64 n, u64 size, F &&f) |
|
bool | update_buffers (u32 vbo, u32 ebo, u64 voff, u64 eoff, u64 vn, u64 vsize, u64 en, u64 esize, void *data, auto &&vgen, auto &&egen) |
|
|
enum class | Backend : u8 {
PSEUDOGRAPH
, TERMINAL_BACKEND
, OPENGL_BACKEND
, OPENGL_ES_BACKEND
,
VULKAN_BACKEND
} |
|
enum class | LogLevel { DEBUG
, WARNING
, ERROR
} |
|
enum class | PresentMode { IMMEDIATE
, MAILBOX
, FIFO
, FIFO_RELAXED
} |
|
enum class | TerminalFlag : u8 {
CLEAR = 1u << 0
, REPOSITION = 1u << 1
, DEDUPLICATE = 1u << 2
, HIDE_CURSOR = 1u << 3
,
RESET_COLOR = 1u << 4
} |
|
enum class | TerminalMode { ASCII
, COLORED
} |
|
enum class | CursorMode { NORMAL
, HIDDEN
, DISABLED
} |
|
using | size_callback_f = void (*)(void*, uvec2) |
|
using | key_callback_f = void (*)(void*, int, int, int, int) |
|
using | mouse_button_callback_f = void (*)(void*, int, int, int) |
|
using | mouse_move_callback_f = void (*)(void*, dvec2) |
|
static std::unique_ptr< Graphics > | create (Backend b, const void *params) |
|
static const char * | enum_str (DeviceInfo::Type t) |
|
static const char * | enum_str (QueueFamily::Flag f) |
|
static const char * | enum_str (PresentMode m) |
|
static const char * | enum_str (MemoryHeap::Flag m) |
|
static const char * | enum_str (MemoryType::Flag m) |
|
static std::string | flags_str (QueueFamily::Flag f) |
|
static std::string | flags_str (MemoryHeap::Flag f) |
|
static std::string | flags_str (MemoryType::Flag f) |
|
static constexpr u32 | TEXTURE_EXTENT = NNGN_TEXTURE_EXTENT |
|
static constexpr u32 | TEXTURE_EXTENT_LOG2 = std::countr_zero(TEXTURE_EXTENT) |
|
static constexpr u32 | TEXTURE_SIZE = NNGN_TEXTURE_SIZE |
|
static constexpr u32 | TEXTURE_MIP_LEVELS = Math::mip_levels(TEXTURE_EXTENT) |
|
static constexpr u32 | SHADOW_MAP_INITIAL_SIZE = 1024 |
|
static constexpr u32 | SHADOW_CUBE_INITIAL_SIZE = 512 |
|
static constexpr float | DEFAULT_EXPOSURE = 1.0f |
|
static constexpr float | DEFAULT_BLOOM_THRESHOLD = 0.75f |
|
static constexpr float | DEFAULT_BLOOM_BLUR_SIZE = 1.0f |
|
static constexpr std::size_t | DEFAULT_BLOOM_DOWNSCALE = 8 |
|
static constexpr std::size_t | DEFAULT_BLUR_DOWNSCALE = 2 |
|
static constexpr std::size_t | DEFAULT_BLOOM_BLUR_PASSES = 10 |
|