nngn
Loading...
Searching...
No Matches
nngn::Pseudograph Struct Reference

#include <pseudo.h>

Inheritance diagram for nngn::Pseudograph:
Collaboration diagram for nngn::Pseudograph:

Public Member Functions

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 load_textures (u32, u32, const std::byte *) 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
 
- Public Member Functions inherited from nngn::Graphics
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)
 

Additional Inherited Members

- Public Types inherited from nngn::Graphics
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 Public Member Functions inherited from nngn::Graphics
static std::unique_ptr< Graphicscreate (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 Public Attributes inherited from nngn::Graphics
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
 

Member Function Documentation

◆ create_buffer()

u32 nngn::Pseudograph::create_buffer ( const BufferConfiguration & )
inlineoverridevirtual

◆ create_pipeline()

u32 nngn::Pseudograph::create_pipeline ( const PipelineConfiguration & )
inlineoverridevirtual

◆ device_extensions()

void nngn::Pseudograph::device_extensions ( std::size_t ,
Extension *  ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ device_infos()

void nngn::Pseudograph::device_infos ( DeviceInfo * ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ error()

bool nngn::Pseudograph::error ( )
inlineoverridevirtual

Implements nngn::Graphics.

◆ extensions()

void nngn::Pseudograph::extensions ( Extension * ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ get_keys()

void nngn::Pseudograph::get_keys ( size_t ,
int32_t *  ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ heaps()

void nngn::Pseudograph::heaps ( std::size_t ,
MemoryHeap *  ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ init_backend()

bool nngn::Pseudograph::init_backend ( void )
inlineoverridevirtual

Implements nngn::Graphics.

◆ init_device() [1/2]

bool nngn::Pseudograph::init_device ( void )
inlineoverridevirtual

Implements nngn::Graphics.

◆ init_device() [2/2]

bool nngn::Pseudograph::init_device ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ init_instance()

bool nngn::Pseudograph::init_instance ( void )
inlineoverridevirtual

Implements nngn::Graphics.

◆ layers()

void nngn::Pseudograph::layers ( Layer * ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ load_font()

bool nngn::Pseudograph::load_font ( unsigned char ,
u32 ,
const nngn::uvec2 * ,
const std::byte *  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ load_textures()

bool nngn::Pseudograph::load_textures ( u32 ,
u32 ,
const std::byte *  )
inlineoverridevirtual

Implements nngn::Graphics.

Reimplemented in TextureTestGraphics.

◆ memory_types()

void nngn::Pseudograph::memory_types ( std::size_t ,
std::size_t ,
MemoryType *  ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ mouse_pos()

ivec2 nngn::Pseudograph::mouse_pos ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_device_extensions()

std::size_t nngn::Pseudograph::n_device_extensions ( std::size_t ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_devices()

std::size_t nngn::Pseudograph::n_devices ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_extensions()

std::size_t nngn::Pseudograph::n_extensions ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_heaps()

std::size_t nngn::Pseudograph::n_heaps ( std::size_t ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_layers()

std::size_t nngn::Pseudograph::n_layers ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_memory_types()

std::size_t nngn::Pseudograph::n_memory_types ( std::size_t ,
std::size_t  ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_present_modes()

std::size_t nngn::Pseudograph::n_present_modes ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ n_queue_families()

std::size_t nngn::Pseudograph::n_queue_families ( std::size_t ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ poll_events()

void nngn::Pseudograph::poll_events ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ present_modes()

void nngn::Pseudograph::present_modes ( PresentMode * ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ queue_families()

void nngn::Pseudograph::queue_families ( std::size_t ,
QueueFamily *  ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ render()

bool nngn::Pseudograph::render ( void )
inlineoverridevirtual

◆ resize()

void nngn::Pseudograph::resize ( int ,
int  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ resize_font()

bool nngn::Pseudograph::resize_font ( u32 )
inlineoverridevirtual

Implements nngn::Graphics.

◆ resize_textures()

bool nngn::Pseudograph::resize_textures ( u32 )
inlineoverridevirtual

Implements nngn::Graphics.

◆ selected_device()

std::size_t nngn::Pseudograph::selected_device ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_automatic_exposure()

void nngn::Pseudograph::set_automatic_exposure ( bool )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_bloom_amount()

void nngn::Pseudograph::set_bloom_amount ( float )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_bloom_blur_passes()

void nngn::Pseudograph::set_bloom_blur_passes ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_bloom_blur_size()

void nngn::Pseudograph::set_bloom_blur_size ( float )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_bloom_downscale()

void nngn::Pseudograph::set_bloom_downscale ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_bloom_threshold()

void nngn::Pseudograph::set_bloom_threshold ( float )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_blur_downscale()

void nngn::Pseudograph::set_blur_downscale ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_blur_passes()

void nngn::Pseudograph::set_blur_passes ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_blur_size()

void nngn::Pseudograph::set_blur_size ( float )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_buffer_capacity()

bool nngn::Pseudograph::set_buffer_capacity ( u32 ,
u64  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_buffer_size()

bool nngn::Pseudograph::set_buffer_size ( u32 ,
u64  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_camera()

void nngn::Pseudograph::set_camera ( const Camera & )
inlineoverridevirtual

◆ set_camera_updated()

void nngn::Pseudograph::set_camera_updated ( void )
inlineoverridevirtual

◆ set_cursor_mode()

void nngn::Pseudograph::set_cursor_mode ( CursorMode )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_exposure()

void nngn::Pseudograph::set_exposure ( float )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_HDR_mix()

void nngn::Pseudograph::set_HDR_mix ( float )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_key_callback()

void nngn::Pseudograph::set_key_callback ( void * ,
key_callback_f  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_lighting()

void nngn::Pseudograph::set_lighting ( const Lighting & )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_lighting_updated()

void nngn::Pseudograph::set_lighting_updated ( )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_mouse_button_callback()

void nngn::Pseudograph::set_mouse_button_callback ( void * ,
mouse_button_callback_f  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_mouse_move_callback()

void nngn::Pseudograph::set_mouse_move_callback ( void * ,
mouse_move_callback_f  )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_n_frames()

bool nngn::Pseudograph::set_n_frames ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_n_swap_chain_images()

bool nngn::Pseudograph::set_n_swap_chain_images ( std::size_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_render_list()

bool nngn::Pseudograph::set_render_list ( const RenderList & )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_shadow_cube_size()

bool nngn::Pseudograph::set_shadow_cube_size ( uint32_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_shadow_map_size()

bool nngn::Pseudograph::set_shadow_map_size ( uint32_t )
inlineoverridevirtual

Implements nngn::Graphics.

◆ set_size_callback()

void nngn::Pseudograph::set_size_callback ( void * ,
size_callback_f  )
inlineoverridevirtual

◆ set_swap_interval()

void nngn::Pseudograph::set_swap_interval ( int )
inlineoverridevirtual

◆ set_window_title()

void nngn::Pseudograph::set_window_title ( const char * )
inlineoverridevirtual

Implements nngn::Graphics.

◆ stats()

GraphicsStats nngn::Pseudograph::stats ( )
inlineoverridevirtual

Implements nngn::Graphics.

◆ surface_info()

SurfaceInfo nngn::Pseudograph::surface_info ( ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ swap_interval()

int nngn::Pseudograph::swap_interval ( void ) const
inlineoverridevirtual

◆ version()

Version nngn::Pseudograph::version ( void ) const
inlineoverridevirtual

◆ vsync()

bool nngn::Pseudograph::vsync ( )
overridevirtual

Implements nngn::Graphics.

◆ window_closed()

bool nngn::Pseudograph::window_closed ( void ) const
inlineoverridevirtual

Implements nngn::Graphics.

◆ window_size()

uvec2 nngn::Pseudograph::window_size ( void ) const
inlineoverridevirtual

◆ write_to_buffer()

bool nngn::Pseudograph::write_to_buffer ( u32 b,
u64 offset,
u64 n,
u64 size,
void * data,
void fvoid *, void *, u64, u64 )
overridevirtual

Implements nngn::Graphics.

Here is the call graph for this function:

The documentation for this struct was generated from the following files: