CmApplication.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmHighLevelGpuProgram.h"
  4. namespace CamelotEngine
  5. {
  6. class RenderWindow;
  7. class Viewport;
  8. class Camera;
  9. class HighLevelGpuProgramManager;
  10. }
  11. namespace CamelotEngine
  12. {
  13. class CM_EXPORT Application
  14. {
  15. public:
  16. Application();
  17. void startUp(const String& renderSystemDll, const String& rendererDll);
  18. void runMainLoop();
  19. void shutDown();
  20. UINT64 getAppWindowId();
  21. RenderWindow* getPrimaryRenderWindow() const { return mPrimaryRenderWindow; }
  22. /**
  23. * @brief Loads a plugin.
  24. *
  25. * @param pluginName Name of the plugin to load, without extension.
  26. */
  27. void loadPlugin(const String& pluginName);
  28. private:
  29. RenderWindow* mPrimaryRenderWindow;
  30. /**
  31. * @brief Callback called from the render thread in order to initialize resources.
  32. */
  33. void updateResourcesCallback();
  34. /**
  35. * @brief Runs the OS specific message pump.
  36. */
  37. void updateMessagePump();
  38. };
  39. CM_EXPORT Application& gApplication();
  40. }