Ember
A C++ 20 'game engine' built with SDL3 with wide platform support.
Public Member Functions | Public Attributes | List of all members
Engine Class Reference

#include <engine.h>

Public Member Functions

void ResizeWindow (int w, int h) const
 
RendererGetRenderer () const
 
InputManagerGetInputManager () const
 
TimeManagerGetTimeManager () const
 
void Shutdown ()
 Deinitialize Window, Renderer and modules. More...
 
bool Initialize (const char *title, int width, int height, RendererType type, Uint64 flags=0)
 Initialize SDL window, renderer and modules. More...
 

Public Attributes

struct {
   int   width = 0
 
   int   height = 0
 
   const char *   title = "[EMBER_ENGINE] - Window"
 
   const SDL_DisplayMode *   data = nullptr
 
   bool   bFullscreen = false
 
   int   bbWidth = 0
 
   int   bbHeight = 0
 
   SDL_Window *   window {}
 
Window
 
struct {
   SDL_AudioDeviceID   device_id = 0
 
   SDL_AudioSpec   spec {}
 
   float   global_volume = 1.f
 
Audio
 
Ember_VFS VirtualFileSystem {}
 

Member Function Documentation

◆ GetInputManager()

InputManager * Engine::GetInputManager ( ) const

◆ GetRenderer()

Renderer * Engine::GetRenderer ( ) const

◆ GetTimeManager()

TimeManager * Engine::GetTimeManager ( ) const

◆ Initialize()

bool Engine::Initialize ( const char *  title,
int  width,
int  height,
RendererType  type,
Uint64  flags = 0 
)

Initialize SDL window, renderer and modules.

  • Window
  • Graphics Backend OpenGL

or Metal

Unset some SDL flags and set supported later.

Can have more than one display, but for now we will just use the first one

◆ ResizeWindow()

void Engine::ResizeWindow ( int  w,
int  h 
) const

◆ Shutdown()

void Engine::Shutdown ( )

Deinitialize Window, Renderer and modules.

Version
0.0.1
Returns
void

Member Data Documentation

◆ 

struct { ... } Engine::Audio

◆ bbHeight

int Engine::bbHeight = 0

◆ bbWidth

int Engine::bbWidth = 0

◆ bFullscreen

bool Engine::bFullscreen = false

◆ data

const SDL_DisplayMode* Engine::data = nullptr

◆ device_id

SDL_AudioDeviceID Engine::device_id = 0

◆ global_volume

float Engine::global_volume = 1.f

◆ height

int Engine::height = 0

◆ spec

SDL_AudioSpec Engine::spec {}

◆ title

const char* Engine::title = "[EMBER_ENGINE] - Window"

◆ VirtualFileSystem

Ember_VFS Engine::VirtualFileSystem {}

◆ width

int Engine::width = 0

◆ window

SDL_Window* Engine::window {}

◆ 

struct { ... } Engine::Window

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