Class Engine

Class Documentation

class nyx::Engine

Engines are the main hub for everything in Nyx. Engines are responsible for handling all

Public Functions

Engine()

Create a new engine.

~Engine()
Window *create_window(std::string const &title, unsigned int width, unsigned int height, bool vsync = true)

Create a new window, adding it to the list of windows for this engine

Return

a pointer to the new Window

Parameters
  • title: the caption/title for the window

  • width: the width of the new window

  • height: the height of the new window

  • vsync: whether the window has vsync enabled

double update()

Update all the timers and events for this window, and the fps for all windows.

void show()

TODO: Document.

Public Members

bool is_running

If true, there is at least one active window.

TimerMgr *timers

Used to manage timers automatically for this Engine instance.