summaryrefslogtreecommitdiff
path: root/src/new_render/render.c
diff options
context:
space:
mode:
authoromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
committeromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
commitf74cf52946f4e569a26bc81105537b40be95c2c7 (patch)
tree1d000367350d0e28eb7cfbc800286a0ed30a4e6c /src/new_render/render.c
parentfedba7ff68924ff50022405fc9103a5acf7013fe (diff)
wip: big makeover
Diffstat (limited to 'src/new_render/render.c')
-rw-r--r--src/new_render/render.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/new_render/render.c b/src/new_render/render.c
index 455b730..f5547d5 100644
--- a/src/new_render/render.c
+++ b/src/new_render/render.c
@@ -4,34 +4,31 @@
#include "render.h"
#include "maths_types.h"
-#include "shadow.h"
-
-struct RendererConfig {
- char window_name[256];
- u32 scr_width, scr_height;
- Vec3 clear_colour;
-};
+#include "pbr.h"
+#include "ral_common.h"
+#include "render_scene.h"
+#include "shadows.h"
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;
+ 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;
+ struct ResourcePools* resource_pools;
};
bool Renderer_Init(RendererConfig config, Renderer* renderer) {
- // set the RAL backend up
+ // set the RAL backend up
- // create our renderpasses
- Shadow_Init(&renderer->shadows);
+ // create our renderpasses
+ Shadow_Init(renderer->shadows);
- return true;
+ return true;
}