diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-11 23:00:26 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-08-11 23:00:26 +1000 |
commit | b03bde3d412148cd573f5f14012cdd270f309947 (patch) | |
tree | 848af582079a60787cc5a5f8138e7ca6d508f2ee /src/render/render.c | |
parent | 48a703e52490cb52fd32e54e3e37f7e70462a267 (diff) |
starting work on immediate mode drawing
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; |