summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-10-27 00:56:55 +1100
committerOmniscient <omniscient.oce@gmail.com>2024-10-27 00:56:55 +1100
commite597fbb916848df1f6fbd4da04c1ab6f89a25b45 (patch)
tree4f7205d14cd78f2a489ab3098c8211549d638448 /include
parent3946ae807a2de00b3c810f986f60ba9cc32bc1a7 (diff)
start on vulkan backend
Diffstat (limited to 'include')
-rw-r--r--include/celeritas.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/celeritas.h b/include/celeritas.h
index 62b3fc3..ef85a66 100644
--- a/include/celeritas.h
+++ b/include/celeritas.h
@@ -69,6 +69,9 @@ _Static_assert(sizeof(ptrdiff_t) == 8, "type ptrdiff_t should be 8 bytes");
#define MB(x) ((size_t)x * 1000 * 1000)
#define GB(x) ((size_t)x * 1000 * 1000 * 1000)
+// TEMP
+#define CEL_PLATFORM_LINUX
+
// Platform informs renderer backend (unless user overrides)
#if defined(CEL_PLATFORM_LINUX) || defined(CEL_PLATFORM_WINDOWS)
#define GPU_VULKAN 1
@@ -76,7 +79,7 @@ _Static_assert(sizeof(ptrdiff_t) == 8, "type ptrdiff_t should be 8 bytes");
#define GPU_METAL 1
#endif
-#define TODO(msg) \
+#define TODO(msg) \
printf("TODO: %s\n", msg); \
exit(1);
@@ -130,10 +133,10 @@ fixed_arena fixed_arena_new(void* backing_buffer, size_t size, size_t alignment)
/**
* @brief Allocates memory on the arena.
- *
+ *
* @param arena
* @param size Number of bytes to reserve
- * @return Pointer to the allocated memory or NULL if there's not enough space
+ * @return Pointer to the allocated memory or NULL if there's not enough space
*/
void* fixed_arena_alloc(fixed_arena* arena, size_t size);
@@ -300,7 +303,7 @@ inlined vec3 vec3_normalise(vec3 a);
inlined f32 vec3_dot(vec3 a, vec3 b);
inlined vec3 vec3_cross(vec3 a, vec3 b);
-inlined vec4 vec4_create(f32 x, f32 y, f32 z, f32 w);
+vec4 vec4_create(f32 x, f32 y, f32 z, f32 w);
// quaternion functions
inlined quat quat_ident();
@@ -353,8 +356,8 @@ DEFINE_HANDLE(compute_pipeline_handle);
typedef struct gpu_swapchain gpu_swapchain;
typedef struct gpu_encoder gpu_encoder; // Render command encoder
typedef struct gpu_compute_encoder gpu_compute_encoder;
-typedef struct gpu_buffer gpu_buffer;
-typedef struct gpu_texture gpu_texture;
+// typedef struct gpu_buffer gpu_buffer;
+// typedef struct gpu_texture gpu_texture;
// NOTE: Can we just use Storage buffer for everything?
// typedef enum gpu_buf_type {} gpu_buf_type;