From f083cacb259054ce996b70f8b9dc0d9eb0bdbfb8 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Fri, 26 Jul 2024 16:37:53 +1000 Subject: wip egui --- src/new_render/render.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/new_render/render.c') diff --git a/src/new_render/render.c b/src/new_render/render.c index a5eae33..c8660a3 100644 --- a/src/new_render/render.c +++ b/src/new_render/render.c @@ -4,6 +4,7 @@ #include "render.h" #include +#include "glad/glad.h" #include #include "camera.h" #include "core.h" @@ -73,8 +74,8 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); #endif - GLFWwindow* window = - glfwCreateWindow(config.scr_width, config.scr_height, config.window_name, NULL, NULL); + window = glfwCreateWindow(config.scr_width, config.scr_height, config.window_name, NULL, NULL); + INFO("Window created"); if (window == NULL) { ERROR("Failed to create GLFW window\n"); glfwTerminate(); @@ -94,7 +95,7 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window ren->window = window; *out_window = window; - glfwMakeContextCurrent(ren->window); + // glfwMakeContextCurrent(ren->window); // FIXME // DEBUG("Set up GLFW window callbacks"); @@ -117,13 +118,13 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window // create our renderpasses ren->shadows = malloc(sizeof(Shadow_Storage)); - Shadow_Init(ren->shadows, 1024, 1024); + // Shadow_Init(ren->shadows, 1024, 1024); ren->pbr = malloc(sizeof(PBR_Storage)); PBR_Init(ren->pbr); ren->terrain = malloc(sizeof(Terrain_Storage)); - Terrain_Init(ren->terrain); + // Terrain_Init(ren->terrain); return true; } @@ -170,6 +171,7 @@ void Render_RenderEntities(RenderEnt* entities, size_t entity_count) { RenderScene scene = ren->scene; Shadow_Storage* shadow_storage = Render_GetShadowStorage(); + shadow_storage->enabled = false; TextureHandle depthmap = shadow_storage->enabled ? Shadow_GetShadowMapTexture(shadow_storage) : INVALID_TEX_HANDLE; -- cgit v1.2.3-70-g09d2