aboutsummaryrefslogtreecommitdiff
path: root/src/platform/bootstrap
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-08 21:07:24 +0800
committercrupest <crupest@outlook.com>2022-05-08 21:07:24 +0800
commita1bbc5da1fb0ae4842a54d89136a784832a76978 (patch)
tree6c06a356dd9121c0c99f5632bce9754d7bb966af /src/platform/bootstrap
parenta7ca9057de3a01d5071406828f134e2e3bcfb49c (diff)
downloadcru-a1bbc5da1fb0ae4842a54d89136a784832a76978.tar.gz
cru-a1bbc5da1fb0ae4842a54d89136a784832a76978.tar.bz2
cru-a1bbc5da1fb0ae4842a54d89136a784832a76978.zip
...
Diffstat (limited to 'src/platform/bootstrap')
-rw-r--r--src/platform/bootstrap/Bootstrap.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/platform/bootstrap/Bootstrap.cpp b/src/platform/bootstrap/Bootstrap.cpp
index 2c8bae5d..cdbd14f1 100644
--- a/src/platform/bootstrap/Bootstrap.cpp
+++ b/src/platform/bootstrap/Bootstrap.cpp
@@ -1,9 +1,11 @@
#include "cru/platform/bootstrap/Bootstrap.h"
-#include "cru/osx/gui/UiApplication.h"
#ifdef CRU_PLATFORM_WINDOWS
+#include "cru/win/graphics/direct/Factory.h"
#include "cru/win/gui/UiApplication.h"
#else
+#include "cru/osx/graphics/quartz/Factory.h"
+#include "cru/osx/gui/UiApplication.h"
#endif
namespace cru::platform::bootstrap {
@@ -14,4 +16,14 @@ cru::platform::gui::IUiApplication* CreateUiApplication() {
return new cru::platform::gui::osx::OsxUiApplication();
#endif
}
+
+CRU_PLATFORM_BOOTSTRAP_API cru::platform::graphics::IGraphicsFactory*
+CreateGraphicsFactory() {
+#ifdef CRU_PLATFORM_WINDOWS
+ return new cru::platform::graphics::win::direct::DirectGraphicsFactory();
+#elif CRU_PLATFORM_OSX
+ return new cru::platform::graphics::osx::quartz::QuartzGraphicsFactory();
+#endif
+}
+
} // namespace cru::platform::bootstrap