From 1901282ae8899cb290e7216829407b8938327279 Mon Sep 17 00:00:00 2001 From: onelin Date: Wed, 17 Dec 2025 14:39:35 +0100 Subject: Add state to resize callback --- src/include/daw/rendering.h | 4 ++-- src/include/daw/window.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/daw/rendering.h b/src/include/daw/rendering.h index 70b1566..321cfd0 100644 --- a/src/include/daw/rendering.h +++ b/src/include/daw/rendering.h @@ -311,7 +311,7 @@ typedef struct { // NULL to skip changing framebuffer_size. Comparable to glViewport. // This function can be heavy due to it destroying and re-creating buffers, // textures and framebuffers. - void (**framebuffer_size_callback)(ivec3* dst,ivec2 src); + void (**framebuffer_size_callback)(ivec3* dst, ivec2 src); // Called when window is resized. Calls the respective framebuffer_size_callback function at // the same index if not null. The camera resize callback function is then @@ -319,7 +319,7 @@ typedef struct { // framebuffer_size_callback is not null, otherwise called with // the new window size. // Set to NULL to skip changing the camera size/perspective. - void (**camera_reset_callback)(Camera*,ivec2 src); + void (**camera_reset_callback)(Camera*, void *state, ivec2 src); // glTexture and glRenderBuffer // Currently, each buffer must be either a texture or a (depth and/or stencil) diff --git a/src/include/daw/window.h b/src/include/daw/window.h index b86ee60..3a4d1b0 100644 --- a/src/include/daw/window.h +++ b/src/include/daw/window.h @@ -112,7 +112,7 @@ void window_init_renderstack(Window *restrict w, void get_mousepos(double *x, double *y); void window_get_size(ivec2* dst); -void window_reset_cameras(Window* w, RenderTargets* restrict targets); +void window_reset_cameras(Window* w, void* state, RenderTargets* restrict targets); #ifdef __cplusplus } -- cgit v1.3