diff options
-rw-r--r-- | src/renderer/render.c | 2 | ||||
-rw-r--r-- | src/renderer/render.h | 14 | ||||
-rw-r--r-- | src/renderer/render_backend.h | 4 | ||||
-rw-r--r-- | src/renderer/render_types.h | 2 |
4 files changed, 19 insertions, 3 deletions
diff --git a/src/renderer/render.c b/src/renderer/render.c index 7884db6..8e67fa6 100644 --- a/src/renderer/render.c +++ b/src/renderer/render.c @@ -38,7 +38,7 @@ bool renderer_init(renderer* ren) { GLFWwindow* window = glfwCreateWindow(ren->config.scr_width, ren->config.scr_height, ren->config.window_name, NULL, NULL); if (window == NULL) { - printf("Failed to create GLFW window\n"); + ERROR("Failed to create GLFW window\n"); glfwTerminate(); return false; } diff --git a/src/renderer/render.h b/src/renderer/render.h index 10702e3..3a06972 100644 --- a/src/renderer/render.h +++ b/src/renderer/render.h @@ -1,3 +1,13 @@ +/** + * @file render.h + * @author your name (you@domain.com) + * @brief Renderer frontend + * @version 0.1 + * @date 2024-03-21 + * + * @copyright Copyright (c) 2024 + * + */ #pragma once #include "camera.h" @@ -10,6 +20,10 @@ bool renderer_init(renderer* ren); /** @brief shutdown the render system frontend */ void renderer_shutdown(renderer* ren); +void renderer_on_resize(renderer *ren); + +struct render_packet; + // --- Frame void render_frame_begin(renderer* ren); diff --git a/src/renderer/render_backend.h b/src/renderer/render_backend.h index 7e1c16c..9644f07 100644 --- a/src/renderer/render_backend.h +++ b/src/renderer/render_backend.h @@ -1,5 +1,5 @@ /** - * @brief + * @brief Renderer backend */ #pragma once @@ -7,6 +7,8 @@ #include "render_types.h" /// --- Lifecycle + +/** @brief Initialise the graphics API backend */ bool gfx_backend_init(renderer* ren); void gfx_backend_shutdown(renderer* ren); diff --git a/src/renderer/render_types.h b/src/renderer/render_types.h index 483e392..02eac6f 100644 --- a/src/renderer/render_types.h +++ b/src/renderer/render_types.h @@ -36,7 +36,7 @@ typedef struct renderer_config { typedef struct renderer { struct GLFWwindow *window; /** Currently all platforms use GLFW*/ - void *backend_state; /** Graphics API-specific state */ + void* backend_state; /** Graphics API-specific state */ renderer_config config; // shaders shader blinn_phong; |