diff options
| author | Vasco <[email protected]> | 2026-08-24 03:53:16 +0100 |
|---|---|---|
| committer | Vasco <[email protected]> | 2026-08-24 03:53:16 +0100 |
| commit | ad5248a3e1bafc1b7dec4c8af82d56ed324ef314 (patch) | |
| tree | b575c3b85d6ad314fa9768855bed9aed8642917e /Rend/rend_internal.h | |
| parent | 5dc2716abd43166cd65133625f408ad36a6623b3 (diff) | |
Slimed out podium. Updated math. Rend kinda works but still bugged.
Diffstat (limited to 'Rend/rend_internal.h')
| -rw-r--r-- | Rend/rend_internal.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Rend/rend_internal.h b/Rend/rend_internal.h index 03e6634..4993d92 100644 --- a/Rend/rend_internal.h +++ b/Rend/rend_internal.h @@ -5,16 +5,21 @@ #if defined(REND_DEBUG) +#ifndef P_LOG_DEBUG_ENABLED #define P_LOG_DEBUG_ENABLED 1 -#define RASSERT(a, s) assert((a) && s) +#endif +#define RASSERT_N(_1, _2, N, ...) N +#define RASSERT(...) RASSERT_N(__VA_ARGS__, RASSERT2, RASSERT1)(__VA_ARGS__) +#define RASSERT1(a) assert(a) +#define RASSERT2(a, s) assert((a) && (s)) #else -#define RASSERT(a,s) ((void*)0) +#define RASSERT(...) ((void)0) #endif #if defined(REND_DEBUG_MEMORY) -#define rmalloc(size) p_debug_malloc_impl((size), __FILE__, __LINE__, __func__) -#define rrealloc(ptr, size) p_debug_realloc_impl((ptr), (size), __FILE__, __LINE__, __func__) -#define rfree(ptr) p_debug_free_impl((ptr), __FILE__, __LINE__, __func__) +#define rmalloc(size) peak_debug_malloc_impl((size), __FILE__, __LINE__, __func__) +#define rrealloc(ptr, size) peak_debug_realloc_impl((ptr), (size), __FILE__, __LINE__, __func__) +#define rfree(ptr) peak_debug_free_impl((ptr), __FILE__, __LINE__, __func__) #else #define rmalloc malloc #define rrealloc(ptr, size) realloc((ptr), (size)) @@ -33,7 +38,6 @@ #define REND__WARN(...) PWARN("[REND] "__VA_ARGS__); -#include "podium.h" #include "rend.h" #include <stdint.h> @@ -67,7 +71,7 @@ typedef struct rend_pipeline_config_t { } Rend__PipelineConfig; typedef struct { - RendContextHandle (*renderer_create)(); + RendContextHandle (*renderer_create)(PeakWindow *window, RendBindingInfo *bind_info); void (*renderer_destroy)(RendContextHandle); @@ -121,7 +125,7 @@ struct rend_renderer_t { struct rend_pipeline_t *pipeline_head; RendContextHandle context; // backend specific internal data - P_Window *window; + PeakWindow *window; uint64_t frame_count; RendBindingInfo bind_info; |
