summaryrefslogtreecommitdiff
path: root/src/defines.h
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-24 22:47:46 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-24 22:47:46 +1100
commit7b3afcaf77f96e7d62f6cd1623ead7f17512d79f (patch)
treeb5f82c64e9c06a84e4d095ab4ac48712e860b673 /src/defines.h
parentb047be5252aeb981faea077409c1768fda0301d9 (diff)
repo init. partial port of existing code
Diffstat (limited to 'src/defines.h')
-rw-r--r--src/defines.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/defines.h b/src/defines.h
index 2129d94..79b735d 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -1,7 +1,6 @@
/**
* @file defines.h
- * @author your name (you@domain.com)
- * @brief
+ * @brief
* @date 2024-02-24
* @copyright Copyright (c) 2024
*/
@@ -41,4 +40,30 @@ _Static_assert(sizeof(f64) == 8, "type f64 should be 8 bytes");
_Static_assert(sizeof(ptrdiff_t) == 8, "");
-#define alignof(x) _Alignof(x) \ No newline at end of file
+#define alignof(x) _Alignof(x)
+
+/*
+Possible platform defines:
+#define CEL_PLATFORM_LINUX 1
+#define CEL_PLATFORM_WINDOWS 1
+#define CEL_PLATFORM_MAC 1
+#define CEL_PLATFORM_HEADLESS 1
+*/
+
+/*
+Renderer backend defines:
+#define CEL_REND_BACKEND_OPENGL 1
+#define CEL_REND_BACKEND_VULKAN 1
+#define CEL_REND_BACKEND_METAL 1
+*/
+
+// Platform will inform renderer backend (unless user overrides)
+#if defined(CEL_PLATFORM_LINUX) || defined(CEL_PLATFORM_WINDOWS)
+#define CEL_REND_BACKEND_OPENGL 1
+// #define CEL_REND_BACKEND_VULKAN 1
+#endif
+
+#if defined(CEL_PLATFORM_MAC)
+#define CEL_REND_BACKEND_METAL 1
+// #define CEL_REND_BACKEND_OPENGL 1
+#endif \ No newline at end of file