From fedba7ff68924ff50022405fc9103a5acf7013fe Mon Sep 17 00:00:00 2001 From: Omniscient Date: Thu, 11 Jul 2024 21:43:06 +1000 Subject: wip --- src/new_render/render.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/new_render/render.c (limited to 'src/new_render/render.c') diff --git a/src/new_render/render.c b/src/new_render/render.c new file mode 100644 index 0000000..455b730 --- /dev/null +++ b/src/new_render/render.c @@ -0,0 +1,37 @@ +/** + * @brief + */ + +#include "render.h" +#include "maths_types.h" +#include "shadow.h" + +struct RendererConfig { + char window_name[256]; + u32 scr_width, scr_height; + Vec3 clear_colour; +}; + +struct Renderer { + struct GLFWwindow* window; + RendererConfig config; + GPU_Device device; + GPU_Swapchain swapchain; + GPU_Renderpass* default_renderpass; + bool frame_aborted; + RenderScene scene; + PBR_Storage pbr; + Shadow_Storage shadows; + Terrain_Storage terrain; + Text_Storage text; + ResourcePools* resource_pools; +}; + +bool Renderer_Init(RendererConfig config, Renderer* renderer) { + // set the RAL backend up + + // create our renderpasses + Shadow_Init(&renderer->shadows); + + return true; +} -- cgit v1.2.3-70-g09d2