BsEditorApplication.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsApplication.h"
  4. #include "BsPath.h"
  5. namespace BansheeEngine
  6. {
  7. class BS_ED_EXPORT EditorApplication : public Application
  8. {
  9. public:
  10. EditorApplication(RenderSystemPlugin renderSystemPlugin);
  11. virtual ~EditorApplication();
  12. static void startUp(RenderSystemPlugin renderSystemPlugin);
  13. bool isProjectLoaded() const;
  14. bool isGameViewFocused() const;
  15. bool isSceneViewFocused() const;
  16. const Path& getActiveProjectPath() const;
  17. EditorSettingsPtr getEditorSettings() const { return mEditorSettings; }
  18. private:
  19. virtual void onStartUp();
  20. virtual void onShutDown();
  21. virtual void update();
  22. EditorWidgetLayoutPtr loadWidgetLayout();
  23. void saveWidgetLayout(const EditorWidgetLayoutPtr& layout);
  24. static void closeModalWindow(RenderWindowPtr window, HSceneObject sceneObject);
  25. private:
  26. static const Path WIDGET_LAYOUT_PATH;
  27. RenderSystemPlugin mActiveRSPlugin;
  28. EditorSettingsPtr mEditorSettings;
  29. DynLib* mSBansheeEditorPlugin;
  30. // DEBUG ONLY
  31. HGpuProgram mFragProgRef;
  32. HGpuProgram mVertProgRef;
  33. HShader mTestShader;
  34. TechniquePtr mNewTechniqueGL;
  35. PassPtr mNewPassGL;
  36. TechniquePtr mNewTechniqueDX;
  37. PassPtr mNewPassDX;
  38. TechniquePtr mNewTechniqueDX11;
  39. PassPtr mNewPassDX11;
  40. HMaterial mTestMaterial;
  41. HTexture mTestTexRef;
  42. HMesh mDbgMeshRef;
  43. };
  44. BS_ED_EXPORT EditorApplication& gEditorApplication();
  45. }