diff options
| author | onelin <oscar@nelin.dk> | 2025-12-17 13:39:35 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2025-12-18 21:14:22 +0000 |
| commit | 1901282ae8899cb290e7216829407b8938327279 (patch) | |
| tree | 19e6ec5c2abbd72087e8f7a8c3cc51e68ffa0ffb /src/include | |
| parent | bb521d304aee0bb990ad92dd8cf5251a4eb1f0fa (diff) | |
Add state to resize callback
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/daw/rendering.h | 4 | ||||
| -rw-r--r-- | src/include/daw/window.h | 2 |
2 files changed, 3 insertions, 3 deletions
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 } |
