diff options
Diffstat (limited to 'src/render/render.c')
-rw-r--r-- | src/render/render.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/render/render.c b/src/render/render.c index bad245a..bf8ac36 100644 --- a/src/render/render.c +++ b/src/render/render.c @@ -100,22 +100,12 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window } } - // #if defined(CEL_REND_BACKEND_OPENGL) - // glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); - // glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); - // glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - // glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); - // #elif defined(CEL_REND_BACKEND_VULKAN) - // glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); - // #endif - ren->window = window; *out_window = window; glfwMakeContextCurrent(ren->window); - // FIXME - // DEBUG("Set up GLFW window callbacks"); + DEBUG("Set up GLFW window callbacks"); glfwSetWindowSizeCallback(window, Render_WindowSizeChanged); // set the RAL backend up @@ -143,8 +133,8 @@ bool Renderer_Init(RendererConfig config, Renderer* ren, GLFWwindow** out_window ren->terrain = calloc(1, sizeof(Terrain_Storage)); Terrain_Init(ren->terrain); - ren->grid = calloc(1, sizeof(Grid_Storage)); - Grid_Init(ren->grid); + // ren->grid = calloc(1, sizeof(Grid_Storage)); + // Grid_Init(ren->grid); ren->immediate = calloc(1, sizeof(Immdraw_Storage)); Immdraw_Init(ren->immediate); @@ -329,6 +319,11 @@ Grid_Storage* Render_GetGridStorage() { return ren->grid; } +Immdraw_Storage* Render_GetImmdrawStorage() { + Renderer* ren = Core_GetRenderer(&g_core); + return ren->immediate; +} + TextureHandle Render_GetWhiteTexture() { Renderer* ren = Core_GetRenderer(&g_core); return ren->white_1x1; |