29 #include "ascension/window.h" |
29 #include "ascension/window.h" |
30 #include "ascension/context.h" |
30 #include "ascension/context.h" |
31 |
31 |
32 #include <GL/glew.h> |
32 #include <GL/glew.h> |
33 |
33 |
34 void asc_window_settings_init_defaults(AscWindowSettings* settings) { |
34 void asc_window_settings_init_defaults(AscWindowSettings *settings) { |
35 settings->dimensions.width = 800; |
35 settings->dimensions.width = 800; |
36 settings->dimensions.height = 600; |
36 settings->dimensions.height = 600; |
37 settings->fullscreen = false; |
37 settings->fullscreen = false; |
38 settings->glsettings.depth_size = 24; |
38 settings->glsettings.depth_size = 24; |
39 settings->glsettings.vsync = 1; |
39 settings->glsettings.vsync = 1; |
40 settings->glsettings.gl_major_version = 4; |
40 settings->glsettings.gl_major_version = 4; |
41 settings->glsettings.gl_minor_version = 0; |
41 settings->glsettings.gl_minor_version = 0; |
42 settings->title = "Ascended Window"; |
42 settings->title = "Ascended Window"; |
43 } |
43 } |
44 |
44 |
45 void asc_window_initialize(unsigned int index, AscWindowSettings const *settings) { |
45 void asc_window_initialize(unsigned int index, const AscWindowSettings *settings) { |
46 if (index >= ASC_MAX_WINDOWS) { |
46 if (index >= ASC_MAX_WINDOWS) { |
47 asc_error("Maximum number of windows exceeded (%u/%u).", index, ASC_MAX_WINDOWS); |
47 asc_error("Maximum number of windows exceeded (%u/%u).", index, ASC_MAX_WINDOWS); |
48 return; |
48 return; |
49 } |
49 } |
50 AscWindow *window = &asc_context.windows[index]; |
50 AscWindow *window = &asc_context.windows[index]; |