summaryrefslogtreecommitdiff
path: root/src/renderer/render.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/render.h')
-rw-r--r--src/renderer/render.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/renderer/render.h b/src/renderer/render.h
index c193ff9..b745e7a 100644
--- a/src/renderer/render.h
+++ b/src/renderer/render.h
@@ -13,6 +13,25 @@
#include "ral_types.h"
#include "render_types.h"
+/** @brief configuration passed to the renderer at init time */
+typedef struct renderer_config {
+ char window_name[256];
+ u32 scr_width, scr_height;
+ vec3 clear_colour; /** colour that the screen gets cleared to every frame */
+} renderer_config;
+
+typedef struct renderer {
+ struct GLFWwindow* window;
+ void* backend_context;
+ renderer_config config;
+ gpu_device device;
+ gpu_swapchain swapchain;
+ gpu_renderpass default_renderpass;
+ gpu_pipeline static_opaque_pipeline;
+ bool frame_aborted;
+ struct resource_pools* resource_pools;
+} renderer;
+
bool renderer_init(renderer* ren);
void renderer_shutdown(renderer* ren);