renderManager.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef RENDERMANAGER_H
  2. #define RENDERMANAGER_H
  3. // ===============================
  4. // AUTHOR : Angel Ortiz (angelo12 AT vt DOT edu)
  5. // CREATE DATE : 2018-07-02
  6. // PURPOSE : To perform all the high level operations that the actual rendering
  7. // class shouldn't really be concerned with such as: building a render
  8. // queue, finding the scene you want to render, and locating the camera.
  9. // It also performs the calls to the other manager level classes.
  10. // ===============================
  11. // SPECIAL NOTES: I think there is much more that could be offloaded to this class
  12. // which is currently being done by the software renderer. For example, the creation of
  13. // the shader object and the setting of data for each model could easily be prepped earlier
  14. // And saved into something like a VBO. Alas, I had no idea what I was doing when I wrote this
  15. // way back and it's time to move on to bigger and better things anyway.
  16. // ===============================
  17. //Includes
  18. #include "displayManager.h"
  19. #include "sceneManager.h"
  20. #include "softwareRenderer.h"
  21. #include "model.h"
  22. #include <queue>
  23. //High level render operations that shouldn't be done by the
  24. //basic graphics lib.
  25. class RenderManager{
  26. public:
  27. //Dummy constructors / Destructors
  28. RenderManager();
  29. ~RenderManager();
  30. //Gets scene and display info. Will be used to build render Queue
  31. bool startUp(DisplayManager &displayManager, SceneManager &sceneManager );
  32. void shutDown();
  33. //Performs all high level prep operations that the graphics library
  34. //Needs to do before beginning to draw each model in the scene.
  35. void render();
  36. private:
  37. void buildRenderQueue();
  38. bool initSoftwareRenderer();
  39. //This is a pointer to a pointer to allow for scene switching
  40. SceneManager * sceneLocator;
  41. DisplayManager * screen;
  42. SoftwareRenderer renderInstance;
  43. std::queue<Model*> *renderObjectQueue;
  44. };
  45. #endif