From 64830ce51a185091f54c2b42b365110d89d44f1b Mon Sep 17 00:00:00 2001 From: Omniscient Date: Sun, 9 Jun 2024 11:42:17 +1000 Subject: triangle on opengl works again. happy days --- src/renderer/backends/metal/backend_metal.h | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/renderer/backends/metal') diff --git a/src/renderer/backends/metal/backend_metal.h b/src/renderer/backends/metal/backend_metal.h index 59b21d6..9561bb6 100644 --- a/src/renderer/backends/metal/backend_metal.h +++ b/src/renderer/backends/metal/backend_metal.h @@ -1,70 +1,70 @@ #pragma once -#define CEL_REND_BACKEND_METAL +// #define CEL_REND_BACKEND_METAL #if defined(CEL_REND_BACKEND_METAL) #include "defines.h" #include "maths_types.h" #ifdef __OBJC__ +#import #import #import #import -#import #else typedef void* id; #endif typedef struct gpu_swapchain { u32x2 dimensions; - #ifdef __OBJC__ +#ifdef __OBJC__ CAMetalLayer* swapchain; - #else +#else void* swapchain; - #endif +#endif } gpu_swapchain; typedef struct gpu_device { - /** @brief `device` gives us access to our GPU */ - #ifdef __OBJC__ +/** @brief `device` gives us access to our GPU */ +#ifdef __OBJC__ id id; - #else +#else void* id; - #endif +#endif } gpu_device; typedef struct gpu_pipeline_layout { void* pad; } gpu_pipeline_layout; typedef struct gpu_pipeline { - #ifdef __OBJC__ +#ifdef __OBJC__ id pipeline_state; - #else +#else void* pipeline_state; - #endif +#endif } gpu_pipeline; typedef struct gpu_renderpass { - #ifdef __OBJC__ +#ifdef __OBJC__ MTLRenderPassDescriptor* rpass_descriptor; - #else +#else void* rpass_descriptor; - #endif +#endif } gpu_renderpass; typedef struct gpu_cmd_encoder { - #ifdef __OBJC__ +#ifdef __OBJC__ id cmd_buffer; id render_encoder; - #else +#else void* cmd_buffer; void* render_encoder; - #endif +#endif } gpu_cmd_encoder; typedef struct gpu_cmd_buffer { void* pad; } gpu_cmd_buffer; typedef struct gpu_buffer { - #ifdef __OBJC__ +#ifdef __OBJC__ id id; - #else +#else void* id; - #endif +#endif u64 size; } gpu_buffer; typedef struct gpu_texture { -- cgit v1.2.3-70-g09d2