aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mgl/window/window.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h
index 350421d..20cfc0d 100644
--- a/include/mgl/window/window.h
+++ b/include/mgl/window/window.h
@@ -38,6 +38,7 @@ struct mgl_window {
bool open;
bool focused;
bool key_repeat_enabled;
+ bool vsync_enabled;
double frame_time_limit;
mgl_clock frame_timer;
char *clipboard_string;
@@ -71,7 +72,7 @@ typedef enum {
*/
typedef bool (*mgl_clipboard_callback)(const unsigned char *data, size_t size, mgl_clipboard_type clipboard_type, void *userdata);
-/* |params| can be NULL */
+/* |params| can be NULL. Note: vsync is enabled by default */
int mgl_window_create(mgl_window *self, const char *title, const mgl_window_create_params *params);
int mgl_window_init_from_existing_window(mgl_window *self, mgl_window_handle existing_window);
void mgl_window_deinit(mgl_window *self);
@@ -111,6 +112,10 @@ void mgl_window_set_title(mgl_window *self, const char *title);
void mgl_window_set_cursor_visible(mgl_window *self, bool visible);
/* 0 = no fps limit, or limit fps to vsync if vsync is enabled */
void mgl_window_set_framerate_limit(mgl_window *self, int fps);
+void mgl_window_set_vsync_enabled(mgl_window *self, bool enabled);
+bool mgl_window_is_vsync_enabled(mgl_window *self);
+void mgl_window_set_fullscreen(mgl_window *self, bool fullscreen);
+bool mgl_window_is_fullscreen(mgl_window *self);
void mgl_window_set_position(mgl_window *self, mgl_vec2i position);
void mgl_window_set_size(mgl_window *self, mgl_vec2i size);