diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-11-03 20:47:32 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-03 20:47:32 +0100 |
commit | 61279a1947328df0b8004edebcbe405ab7b1c09e (patch) | |
tree | 3b15cfb697f14e7fea40c9bdbeeb8c21ab8e7804 /include | |
parent | f26a606bf50f7dbe35c79bfa52f2026bd7af3eb8 (diff) |
Add mgl_window_get_view instead of giving prev view in set_view
Diffstat (limited to 'include')
-rw-r--r-- | include/mgl/window/window.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h index 8e3f626..ad8e1dd 100644 --- a/include/mgl/window/window.h +++ b/include/mgl/window/window.h @@ -39,11 +39,12 @@ bool mgl_window_poll_event(mgl_window *self, mgl_event *event); void mgl_window_display(mgl_window *self); /* - The previous view is returned in |prev_view|. |prev_view| may be NULL. This should be called every frame to retain the view. - Make sure to set the view back to |prev_view| after rendering items - inside the view. + Make sure to set the view back to the previous view after rendering items + by saving the previous view with |mgl_window_get_view| and then call + |mgl_window_set_view| with that saved view. */ -void mgl_window_set_view(mgl_window *self, mgl_view *new_view, mgl_view *prev_view); +void mgl_window_set_view(mgl_window *self, mgl_view *new_view); +void mgl_window_get_view(mgl_window *self, mgl_view *view); #endif /* MGL_WINDOW_H */ |