API Documentation
MainSystem.h
1 // MainSystem.h
3 //
5 
6 namespace nkGraphics
7 {
13  class MainSystem final : public nkCommon::SingletonClass<nkGraphics::MainSystem>
14  {
15  public :
16 
21 
22  // Getters
26  Renderer* getRenderer () const ;
30  bool isInitialized () const ;
34  bool getHasRunToContinue () const ;
35 
36  // Setters
42  void setHasRunToContinue (bool value) ;
43 
44  // To start
53  bool initialize (const Configuration& config = Configuration()) ;
62  void run (RenderContext* context, std::function<void ()> loopCallback = [] () {}) ;
63 
64  // To end
68  void shutdown () ;
69 
70  // Step by step
77  bool frame (RenderContext* context) ;
84  void tickForNewFrame (RenderContext* context) ;
85  } ;
86 }
nkGraphics::MainSystem::isInitialized
bool isInitialized() const
nkGraphics::MainSystem::run
void run(RenderContext *context, std::function< void()> loopCallback=[]() {})
nkGraphics::MainSystem
Main interface with the component system.
Definition: MainSystem.h:14
nkGraphics::MainSystem::getHasRunToContinue
bool getHasRunToContinue() const
nkGraphics::MainSystem::~MainSystem
~MainSystem()
nkGraphics::MainSystem::getRenderer
Renderer * getRenderer() const
nkGraphics::MainSystem::tickForNewFrame
void tickForNewFrame(RenderContext *context)
nkGraphics::RenderContext
A rendering context, attached to a window or an offscreen texture.
Definition: RenderContext.h:14
nkGraphics::MainSystem::frame
bool frame(RenderContext *context)
nkGraphics::Renderer
A renderer, implementing the logic of using a graphics API.
Definition: Renderer.h:18
nkGraphics::MainSystem::shutdown
void shutdown()
nkGraphics::Configuration
Configuration for the system's initialization.
Definition: Configuration.h:12
nkGraphics::MainSystem::setHasRunToContinue
void setHasRunToContinue(bool value)
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::MainSystem::initialize
bool initialize(const Configuration &config=Configuration())