BsEditorApplication.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. private:
  18. virtual void onStartUp();
  19. virtual void onShutDown();
  20. virtual void update();
  21. EditorWidgetLayoutPtr loadWidgetLayout();
  22. void saveWidgetLayout(const EditorWidgetLayoutPtr& layout);
  23. static void closeModalWindow(RenderWindowPtr window, HSceneObject sceneObject);
  24. private:
  25. static const Path WIDGET_LAYOUT_PATH;
  26. RenderSystemPlugin mActiveRSPlugin;
  27. DynLib* mSBansheeEditorPlugin;
  28. // DEBUG ONLY
  29. HGpuProgram mFragProgRef;
  30. HGpuProgram mVertProgRef;
  31. ShaderPtr mTestShader;
  32. TechniquePtr mNewTechniqueGL;
  33. PassPtr mNewPassGL;
  34. TechniquePtr mNewTechniqueDX;
  35. PassPtr mNewPassDX;
  36. TechniquePtr mNewTechniqueDX11;
  37. PassPtr mNewPassDX11;
  38. HMaterial mTestMaterial;
  39. HTexture mTestTexRef;
  40. HMesh mDbgMeshRef;
  41. };
  42. BS_ED_EXPORT EditorApplication& gEditorApplication();
  43. }