diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-07-11 21:43:06 +1000 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-07-11 21:43:06 +1000 |
commit | fedba7ff68924ff50022405fc9103a5acf7013fe (patch) | |
tree | cd4e8ebd21736d460ac0434ce08cc2012bf613e0 /src/new_render/render.c | |
parent | 9f23f65ec631bcd08f200b3ef517da8acf8d6b17 (diff) |
wip
Diffstat (limited to 'src/new_render/render.c')
-rw-r--r-- | src/new_render/render.c | 37 |
1 files changed, 37 insertions, 0 deletions
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; +} |