IRenderProject.h
Go to the documentation of this file.
1 #ifndef B_I_RENDERER_PROJECT_H
2 #define B_I_RENDERER_PROJECT_H
3 
4 /* bRenderer includes */
5 #include "../bRenderer.h"
6 
11 {
12 public:
13 
17  {
18  bRenderer().setRenderProject(this); // set this instance of RenderProject to be used for function calls
19  }
20 
23  virtual ~IRenderProject(){}
24 
27  virtual void initFunction() = 0;
28 
33  virtual void loopFunction(const double &deltaTime, const double &elapsedTime) = 0;
34 
37  virtual void terminateFunction() = 0;
38 
39 protected:
40 
44  {
45  return _renderer;
46  }
47 
48 private:
49  Renderer _renderer;
50 };
51 
52 #endif /* defined(B_I_RENDERER_PROJECT_H) */
The main class that is able to initialize and maintain the render loop as well as a view...
Definition: Renderer.h:22
virtual void terminateFunction()=0
Function that gets called when terminating the renderer.
Renderer & bRenderer()
Returns the project's instance of the renderer.
Definition: IRenderProject.h:43
This interface needs to be implemented if the renderer should be used in an object oriented manner...
Definition: IRenderProject.h:10
virtual void initFunction()=0
Function that gets called when initializing the renderer.
virtual void loopFunction(const double &deltaTime, const double &elapsedTime)=0
Function that gets called repeatedly when looping.
virtual ~IRenderProject()
Virtual destructor.
Definition: IRenderProject.h:23
IRenderProject()
Constructor.
Definition: IRenderProject.h:16
void setRenderProject(IRenderProject *p)
Sets the project instance to be used for function calls.
Definition: Renderer.cpp:42