From 7b3afcaf77f96e7d62f6cd1623ead7f17512d79f Mon Sep 17 00:00:00 2001 From: Omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 24 Feb 2024 22:47:46 +1100 Subject: repo init. partial port of existing code --- src/defines.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/defines.h') 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 -- cgit v1.2.3-70-g09d2