ruby_rpg 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/glfw-3.3.9.bin.MACOS/LICENSE.md +23 -0
- data/glfw-3.3.9.bin.MACOS/README.md +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/bc_s.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/bc_sd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/build_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/build_guide.html +199 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/closed.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/compat_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/compat_guide.html +153 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/compile_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/compile_guide.html +223 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/context_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/context_guide.html +259 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/deprecated.html +88 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_08423ce7729c4554356a7de7171ba263.html +85 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_2dcebcdf14b42e92a6ed85c61bda6b9d.html +93 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_62ce056722ee97c199075aa1d6eca309.html +95 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_dddf4cf62655095a666cf715de3a31a2.html +91 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/doc.svg +12 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/docd.svg +12 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/doxygen.css +1685 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/doxygen.svg +28 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/dynsections.js +192 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/extra.css +1 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/files.html +91 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/folderclosed.svg +11 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/folderclosedd.svg +11 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/folderopen.svg +17 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/folderopend.svg +12 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3_8h.html +1661 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3_8h_source.html +1175 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3native_8h.html +167 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3native_8h_source.html +303 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__buttons.html +282 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__context.html +304 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__errors.html +304 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__gamepad__axes.html +202 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__gamepad__buttons.html +410 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__hat__state.html +234 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__init.html +570 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__input.html +2255 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__joysticks.html +362 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__keys.html +2034 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__mods.html +198 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__monitor.html +848 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__native.html +812 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__shapes.html +198 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__vulkan.html +359 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/group__window.html +3434 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/index.html +100 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/input_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/input_guide.html +570 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/internal_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/internals_guide.html +132 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/intro_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/intro_guide.html +351 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/jquery.js +34 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/main_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/menu.js +136 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/menudata.js +29 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/minus.svg +8 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/minusd.svg +8 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/monitor_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/monitor_guide.html +229 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/moving_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/moving_guide.html +374 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_f.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_fd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_g.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_h.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_hd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/news.html +634 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/news_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/open.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/pages.html +99 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/plus.svg +9 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/plusd.svg +9 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/quick_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/quick_guide.html +397 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_0.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_1.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_10.js +65 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_11.js +26 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_12.js +44 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_13.js +34 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_14.js +12 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_15.js +52 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_16.js +69 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_17.js +51 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_18.js +14 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_19.js +36 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_1a.js +98 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_1b.js +12 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_2.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_3.js +9 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_4.js +57 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_5.js +22 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_6.js +103 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_7.js +23 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_8.js +35 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_9.js +63 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_a.js +505 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_b.js +24 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_c.js +50 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_d.js +17 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_e.js +12 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_f.js +35 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/classes_0.js +7 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/close.svg +18 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/defines_0.js +34 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_0.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_1.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_2.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_3.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_4.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_5.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_6.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_7.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_8.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/functions_0.js +146 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_0.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_1.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_10.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_2.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_3.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_4.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_5.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_6.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_7.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_8.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_9.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_a.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_b.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_c.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_d.js +7 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_e.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_f.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag.svg +24 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag_d.svg +24 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag_sel.svg +31 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag_seld.svg +31 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_0.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_1.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_10.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_2.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_3.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_4.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_5.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_6.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_7.js +7 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_8.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_9.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_a.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_b.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_c.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_d.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_e.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_f.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/search.css +291 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/search.js +840 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/searchdata.js +39 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/typedefs_0.js +32 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_0.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_1.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_2.js +5 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_3.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_4.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_5.js +6 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_6.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_7.js +4 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/spaces.svg +877 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/splitbar.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/splitbard.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wgamepadstate.html +134 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wgammaramp.html +170 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wimage.html +151 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wvidmode.html +204 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/sync_off.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/sync_on.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_a.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_ad.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_b.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_bd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_h.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_hd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_s.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_sd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tabs.css +1 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/vulkan_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/vulkan_guide.html +196 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/window_8dox.html +81 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/window_guide.html +763 -0
- data/glfw-3.3.9.bin.MACOS/include/GLFW/glfw3.h +5932 -0
- data/glfw-3.3.9.bin.MACOS/include/GLFW/glfw3native.h +634 -0
- data/glfw-3.3.9.bin.MACOS/lib-arm64/libglfw.3.dylib +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-arm64/libglfw3.a +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-universal/libglfw.3.dylib +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-universal/libglfw3.a +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-x86_64/libglfw.3.dylib +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-x86_64/libglfw3.a +0 -0
- data/glfw-3.4.bin.WIN64/LICENSE.md +23 -0
- data/glfw-3.4.bin.WIN64/README.md +70 -0
- data/glfw-3.4.bin.WIN64/docs/html/bc_s.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/bc_sd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/build_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/build_guide.html +217 -0
- data/glfw-3.4.bin.WIN64/docs/html/closed.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/compat_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/compat_guide.html +156 -0
- data/glfw-3.4.bin.WIN64/docs/html/compile_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/compile_guide.html +219 -0
- data/glfw-3.4.bin.WIN64/docs/html/context_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/context_guide.html +258 -0
- data/glfw-3.4.bin.WIN64/docs/html/deprecated.html +88 -0
- data/glfw-3.4.bin.WIN64/docs/html/dir_13577e2d8b9423099662de029791bd7d.html +93 -0
- data/glfw-3.4.bin.WIN64/docs/html/dir_7f92719a7fe62e5b064f87d7a3c220b1.html +95 -0
- data/glfw-3.4.bin.WIN64/docs/html/dir_a788ef6c2b1e5b367804e0b6ccfd6f11.html +85 -0
- data/glfw-3.4.bin.WIN64/docs/html/dir_b11153cd0f4fd04a7564cc166f482635.html +91 -0
- data/glfw-3.4.bin.WIN64/docs/html/doc.svg +12 -0
- data/glfw-3.4.bin.WIN64/docs/html/docd.svg +12 -0
- data/glfw-3.4.bin.WIN64/docs/html/doxygen.css +1685 -0
- data/glfw-3.4.bin.WIN64/docs/html/doxygen.svg +28 -0
- data/glfw-3.4.bin.WIN64/docs/html/dynsections.js +192 -0
- data/glfw-3.4.bin.WIN64/docs/html/extra.css +2 -0
- data/glfw-3.4.bin.WIN64/docs/html/files.html +91 -0
- data/glfw-3.4.bin.WIN64/docs/html/folderclosed.svg +11 -0
- data/glfw-3.4.bin.WIN64/docs/html/folderclosedd.svg +11 -0
- data/glfw-3.4.bin.WIN64/docs/html/folderopen.svg +17 -0
- data/glfw-3.4.bin.WIN64/docs/html/folderopend.svg +12 -0
- data/glfw-3.4.bin.WIN64/docs/html/glfw3_8h.html +1910 -0
- data/glfw-3.4.bin.WIN64/docs/html/glfw3_8h_source.html +1260 -0
- data/glfw-3.4.bin.WIN64/docs/html/glfw3native_8h.html +170 -0
- data/glfw-3.4.bin.WIN64/docs/html/glfw3native_8h_source.html +306 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__buttons.html +282 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__context.html +304 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__errors.html +384 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__gamepad__axes.html +202 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__gamepad__buttons.html +410 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__hat__state.html +234 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__init.html +1015 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__input.html +2285 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__joysticks.html +362 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__keys.html +2034 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__mods.html +198 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__monitor.html +849 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__native.html +837 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__shapes.html +337 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__vulkan.html +361 -0
- data/glfw-3.4.bin.WIN64/docs/html/group__window.html +3608 -0
- data/glfw-3.4.bin.WIN64/docs/html/index.html +100 -0
- data/glfw-3.4.bin.WIN64/docs/html/input_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/input_guide.html +576 -0
- data/glfw-3.4.bin.WIN64/docs/html/internal_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/internals_guide.html +135 -0
- data/glfw-3.4.bin.WIN64/docs/html/intro_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/intro_guide.html +429 -0
- data/glfw-3.4.bin.WIN64/docs/html/jquery.js +34 -0
- data/glfw-3.4.bin.WIN64/docs/html/main_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/menu.js +136 -0
- data/glfw-3.4.bin.WIN64/docs/html/menudata.js +30 -0
- data/glfw-3.4.bin.WIN64/docs/html/minus.svg +8 -0
- data/glfw-3.4.bin.WIN64/docs/html/minusd.svg +8 -0
- data/glfw-3.4.bin.WIN64/docs/html/monitor_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/monitor_guide.html +228 -0
- data/glfw-3.4.bin.WIN64/docs/html/moving_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/moving_guide.html +360 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_f.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_fd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_g.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_h.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_hd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/news.html +336 -0
- data/glfw-3.4.bin.WIN64/docs/html/news_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/open.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/pages.html +99 -0
- data/glfw-3.4.bin.WIN64/docs/html/plus.svg +9 -0
- data/glfw-3.4.bin.WIN64/docs/html/plusd.svg +9 -0
- data/glfw-3.4.bin.WIN64/docs/html/quick_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/quick_guide.html +406 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_0.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_10.js +13 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_11.js +11 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_12.js +26 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_13.js +51 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_14.js +22 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_15.js +35 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_16.js +29 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_17.js +8 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_18.js +44 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_19.js +60 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1a.js +39 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1b.js +8 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1c.js +32 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1d.js +84 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1e.js +13 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1f.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_2.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_3.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_4.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_5.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_6.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_7.js +58 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_8.js +21 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_9.js +82 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_a.js +20 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_b.js +26 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_c.js +35 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_d.js +555 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_e.js +23 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/all_f.js +40 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/classes_0.js +8 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/close.svg +18 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/defines_0.js +43 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_0.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_1.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_2.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_3.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_4.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_5.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_6.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_7.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/files_8.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/functions_0.js +152 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_0.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_1.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_10.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_2.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_3.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_4.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_5.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_6.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_7.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_8.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_9.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_a.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_b.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_c.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_d.js +7 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_e.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_f.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/mag.svg +24 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/mag_d.svg +24 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/mag_sel.svg +31 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/mag_seld.svg +31 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_0.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_1.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_10.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_11.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_2.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_3.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_4.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_5.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_6.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_7.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_8.js +7 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_9.js +7 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_a.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_b.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_c.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_d.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_e.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_f.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/search.css +291 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/search.js +840 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/searchdata.js +39 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/typedefs_0.js +36 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_0.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_1.js +6 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_2.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_3.js +5 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_4.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_5.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_6.js +7 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_7.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_8.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_9.js +4 -0
- data/glfw-3.4.bin.WIN64/docs/html/spaces.svg +877 -0
- data/glfw-3.4.bin.WIN64/docs/html/splitbar.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/splitbard.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wallocator.html +168 -0
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wgamepadstate.html +134 -0
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wgammaramp.html +170 -0
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wimage.html +151 -0
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wvidmode.html +204 -0
- data/glfw-3.4.bin.WIN64/docs/html/sync_off.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/sync_on.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_a.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_ad.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_b.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_bd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_h.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_hd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_s.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_sd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tabs.css +1 -0
- data/glfw-3.4.bin.WIN64/docs/html/topics.html +101 -0
- data/glfw-3.4.bin.WIN64/docs/html/vulkan_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/vulkan_guide.html +206 -0
- data/glfw-3.4.bin.WIN64/docs/html/window_8md.html +81 -0
- data/glfw-3.4.bin.WIN64/docs/html/window_guide.html +806 -0
- data/glfw-3.4.bin.WIN64/include/GLFW/glfw3.h +6547 -0
- data/glfw-3.4.bin.WIN64/include/GLFW/glfw3native.h +663 -0
- data/glfw-3.4.bin.WIN64/lib-mingw-w64/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-mingw-w64/libglfw3.a +0 -0
- data/glfw-3.4.bin.WIN64/lib-mingw-w64/libglfw3dll.a +0 -0
- data/glfw-3.4.bin.WIN64/lib-static-ucrt/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-static-ucrt/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3dll.lib +0 -0
- data/lib/build.bash +12 -0
- data/lib/engine/camera.rb +13 -0
- data/lib/engine/component.rb +48 -0
- data/lib/engine/components/direction_light.rb +23 -0
- data/lib/engine/components/font_renderer.rb +134 -0
- data/lib/engine/components/mesh_renderer.rb +31 -0
- data/lib/engine/components/orthographic_camera.rb +54 -0
- data/lib/engine/components/perspective_camera.rb +53 -0
- data/lib/engine/components/point_light.rb +24 -0
- data/lib/engine/components/sprite_renderer.rb +141 -0
- data/lib/engine/components/ui_font_renderer.rb +140 -0
- data/lib/engine/components/ui_sprite_renderer.rb +101 -0
- data/lib/engine/cursor.rb +43 -0
- data/lib/engine/engine.rb +221 -0
- data/lib/engine/font.rb +74 -0
- data/lib/engine/game_object.rb +198 -0
- data/lib/engine/importers/font_importer.rb +69 -0
- data/lib/engine/importers/obj_file.rb +244 -0
- data/lib/engine/importers/obj_importer.rb +33 -0
- data/lib/engine/input.rb +61 -0
- data/lib/engine/material.rb +79 -0
- data/lib/engine/mesh.rb +43 -0
- data/lib/engine/path.rb +92 -0
- data/lib/engine/physics/collision.rb +12 -0
- data/lib/engine/physics/components/cube_collider.rb +6 -0
- data/lib/engine/physics/components/rigidbody.rb +103 -0
- data/lib/engine/physics/components/sphere_collider.rb +93 -0
- data/lib/engine/physics/physics_resolver.rb +37 -0
- data/lib/engine/polygon_mesh.rb +45 -0
- data/lib/engine/quaternion.rb +228 -0
- data/lib/engine/rendering/instance_renderer.rb +153 -0
- data/lib/engine/rendering/render_pipeline.rb +35 -0
- data/lib/engine/screenshoter.rb +34 -0
- data/lib/engine/shader.rb +91 -0
- data/lib/engine/shaders/colour_frag.glsl +9 -0
- data/lib/engine/shaders/colour_vertex.glsl +14 -0
- data/lib/engine/shaders/mesh_frag.glsl +102 -0
- data/lib/engine/shaders/mesh_vertex.glsl +25 -0
- data/lib/engine/shaders/skybox_frag.glsl +12 -0
- data/lib/engine/shaders/skybox_vert.glsl +14 -0
- data/lib/engine/shaders/sprite_frag.glsl +17 -0
- data/lib/engine/shaders/sprite_vertex.glsl +16 -0
- data/lib/engine/shaders/text_frag.glsl +15 -0
- data/lib/engine/shaders/text_vertex.glsl +31 -0
- data/lib/engine/shaders/ui_sprite_frag.glsl +15 -0
- data/lib/engine/shaders/ui_sprite_vertex.glsl +16 -0
- data/lib/engine/shaders/vertex_lit_frag.glsl +89 -0
- data/lib/engine/shaders/vertex_lit_vertex.glsl +28 -0
- data/lib/engine/tangent_calculator.rb +42 -0
- data/lib/engine/texture.rb +52 -0
- data/lib/engine/video_mode.rb +37 -0
- data/lib/engine/window.rb +126 -0
- metadata +482 -1
@@ -0,0 +1,763 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
7
|
+
<meta name="generator" content="Doxygen 1.9.8"/>
|
8
|
+
<title>GLFW: Window guide</title>
|
9
|
+
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
10
|
+
<script type="text/javascript" src="jquery.js"></script>
|
11
|
+
<script type="text/javascript" src="dynsections.js"></script>
|
12
|
+
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
13
|
+
<script type="text/javascript" src="search/searchdata.js"></script>
|
14
|
+
<script type="text/javascript" src="search/search.js"></script>
|
15
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
16
|
+
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
20
|
+
<div id="titlearea">
|
21
|
+
<div class="glfwheader">
|
22
|
+
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
23
|
+
<ul class="glfwnavbar">
|
24
|
+
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
25
|
+
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
26
|
+
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
27
|
+
</ul>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<!-- end header part -->
|
31
|
+
<!-- Generated by Doxygen 1.9.8 -->
|
32
|
+
<script type="text/javascript">
|
33
|
+
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
34
|
+
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
35
|
+
/* @license-end */
|
36
|
+
</script>
|
37
|
+
<script type="text/javascript" src="menudata.js"></script>
|
38
|
+
<script type="text/javascript" src="menu.js"></script>
|
39
|
+
<script type="text/javascript">
|
40
|
+
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
41
|
+
$(function() {
|
42
|
+
initMenu('',true,false,'search.php','Search');
|
43
|
+
$(document).ready(function() { init_search(); });
|
44
|
+
});
|
45
|
+
/* @license-end */
|
46
|
+
</script>
|
47
|
+
<div id="main-nav"></div>
|
48
|
+
<!-- window showing the filter options -->
|
49
|
+
<div id="MSearchSelectWindow"
|
50
|
+
onmouseover="return searchBox.OnSearchSelectShow()"
|
51
|
+
onmouseout="return searchBox.OnSearchSelectHide()"
|
52
|
+
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<!-- iframe showing the search results (closed by default) -->
|
56
|
+
<div id="MSearchResultsWindow">
|
57
|
+
<div id="MSearchResults">
|
58
|
+
<div class="SRPage">
|
59
|
+
<div id="SRIndex">
|
60
|
+
<div id="SRResults"></div>
|
61
|
+
<div class="SRStatus" id="Loading">Loading...</div>
|
62
|
+
<div class="SRStatus" id="Searching">Searching...</div>
|
63
|
+
<div class="SRStatus" id="NoMatches">No Matches</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
</div><!-- top -->
|
70
|
+
<div><div class="header">
|
71
|
+
<div class="headertitle"><div class="title">Window guide</div></div>
|
72
|
+
</div><!--header-->
|
73
|
+
<div class="contents">
|
74
|
+
<div class="toc"><h3>Table of Contents</h3>
|
75
|
+
<ul><li class="level1"><a href="#window_object">Window objects</a><ul><li class="level2"><a href="#window_creation">Window creation</a><ul><li class="level3"><a href="#window_full_screen">Full screen windows</a></li>
|
76
|
+
<li class="level3"><a href="#window_windowed_full_screen">"Windowed full screen" windows</a></li>
|
77
|
+
</ul>
|
78
|
+
</li>
|
79
|
+
<li class="level2"><a href="#window_destruction">Window destruction</a></li>
|
80
|
+
<li class="level2"><a href="#window_hints">Window creation hints</a><ul><li class="level3"><a href="#window_hints_hard">Hard and soft constraints</a></li>
|
81
|
+
<li class="level3"><a href="#window_hints_wnd">Window related hints</a></li>
|
82
|
+
<li class="level3"><a href="#window_hints_fb">Framebuffer related hints</a></li>
|
83
|
+
<li class="level3"><a href="#window_hints_mtr">Monitor related hints</a></li>
|
84
|
+
<li class="level3"><a href="#window_hints_ctx">Context related hints</a></li>
|
85
|
+
<li class="level3"><a href="#window_hints_osx">macOS specific window hints</a></li>
|
86
|
+
<li class="level3"><a href="#window_hints_x11">X11 specific window hints</a></li>
|
87
|
+
<li class="level3"><a href="#window_hints_values">Supported and default values</a></li>
|
88
|
+
</ul>
|
89
|
+
</li>
|
90
|
+
</ul>
|
91
|
+
</li>
|
92
|
+
<li class="level1"><a href="#window_events">Window event processing</a></li>
|
93
|
+
<li class="level1"><a href="#window_properties">Window properties and events</a><ul><li class="level2"><a href="#window_userptr">User pointer</a></li>
|
94
|
+
<li class="level2"><a href="#window_close">Window closing and close flag</a></li>
|
95
|
+
<li class="level2"><a href="#window_size">Window size</a></li>
|
96
|
+
<li class="level2"><a href="#window_fbsize">Framebuffer size</a></li>
|
97
|
+
<li class="level2"><a href="#window_scale">Window content scale</a></li>
|
98
|
+
<li class="level2"><a href="#window_sizelimits">Window size limits</a></li>
|
99
|
+
<li class="level2"><a href="#window_pos">Window position</a></li>
|
100
|
+
<li class="level2"><a href="#window_title">Window title</a></li>
|
101
|
+
<li class="level2"><a href="#window_icon">Window icon</a></li>
|
102
|
+
<li class="level2"><a href="#window_monitor">Window monitor</a></li>
|
103
|
+
<li class="level2"><a href="#window_iconify">Window iconification</a></li>
|
104
|
+
<li class="level2"><a href="#window_maximize">Window maximization</a></li>
|
105
|
+
<li class="level2"><a href="#window_hide">Window visibility</a></li>
|
106
|
+
<li class="level2"><a href="#window_focus">Window input focus</a></li>
|
107
|
+
<li class="level2"><a href="#window_attention">Window attention request</a></li>
|
108
|
+
<li class="level2"><a href="#window_refresh">Window damage and refresh</a></li>
|
109
|
+
<li class="level2"><a href="#window_transparency">Window transparency</a></li>
|
110
|
+
<li class="level2"><a href="#window_attribs">Window attributes</a><ul><li class="level3"><a href="#window_attribs_wnd">Window related attributes</a></li>
|
111
|
+
<li class="level3"><a href="#window_attribs_ctx">Context related attributes</a></li>
|
112
|
+
<li class="level3"><a href="#window_attribs_fb">Framebuffer related attributes</a></li>
|
113
|
+
</ul>
|
114
|
+
</li>
|
115
|
+
</ul>
|
116
|
+
</li>
|
117
|
+
<li class="level1"><a href="#buffer_swap">Buffer swapping</a></li>
|
118
|
+
</ul>
|
119
|
+
</div>
|
120
|
+
<div class="textblock"><p>This guide introduces the window related functions of GLFW. For details on a specific function in this category, see the <a class="el" href="group__window.html">Window reference</a>. There are also guides for the other areas of GLFW.</p>
|
121
|
+
<ul>
|
122
|
+
<li><a class="el" href="intro_guide.html">Introduction to the API</a></li>
|
123
|
+
<li><a class="el" href="context_guide.html">Context guide</a></li>
|
124
|
+
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a></li>
|
125
|
+
<li><a class="el" href="monitor_guide.html">Monitor guide</a></li>
|
126
|
+
<li><a class="el" href="input_guide.html">Input guide</a></li>
|
127
|
+
</ul>
|
128
|
+
<h1><a class="anchor" id="window_object"></a>
|
129
|
+
Window objects</h1>
|
130
|
+
<p>The <a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> object encapsulates both a window and a context. They are created with <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> and destroyed with <a class="el" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a>, or <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>, if any remain. As the window and context are inseparably linked, the object pointer is used as both a context and window handle.</p>
|
131
|
+
<p>To see the event stream provided to the various window related callbacks, run the <code>events</code> test program.</p>
|
132
|
+
<h2><a class="anchor" id="window_creation"></a>
|
133
|
+
Window creation</h2>
|
134
|
+
<p>A window and its OpenGL or OpenGL ES context are created with <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>, which returns a handle to the created window object. For example, this creates a 640 by 480 windowed mode window:</p>
|
135
|
+
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">"My Title"</span>, NULL, NULL);</div>
|
136
|
+
<div class="ttc" id="agroup__window_html_ga3555a418df92ad53f917597fe2f64aeb"><div class="ttname"><a href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a></div><div class="ttdeci">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class="ttdoc">Creates a window and its associated context.</div></div>
|
137
|
+
<div class="ttc" id="agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242"><div class="ttname"><a href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a></div><div class="ttdeci">struct GLFWwindow GLFWwindow</div><div class="ttdoc">Opaque window object.</div><div class="ttdef"><b>Definition</b> glfw3.h:1195</div></div>
|
138
|
+
</div><!-- fragment --><p>If window creation fails, <code>NULL</code> will be returned, so it is necessary to check the return value.</p>
|
139
|
+
<p>The window handle is passed to all window related functions and is provided to along with all input events, so event handlers can tell which window received the event.</p>
|
140
|
+
<h3><a class="anchor" id="window_full_screen"></a>
|
141
|
+
Full screen windows</h3>
|
142
|
+
<p>To create a full screen window, you need to specify which monitor the window should use. In most cases, the user's primary monitor is a good choice. For more information about retrieving monitors, see <a class="el" href="monitor_guide.html#monitor_monitors">Retrieving monitors</a>.</p>
|
143
|
+
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">"My Title"</span>, <a class="code hl_function" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a>(), NULL);</div>
|
144
|
+
<div class="ttc" id="agroup__monitor_html_gac3adb24947eb709e1874028272e5dfc5"><div class="ttname"><a href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a></div><div class="ttdeci">GLFWmonitor * glfwGetPrimaryMonitor(void)</div><div class="ttdoc">Returns the primary monitor.</div></div>
|
145
|
+
</div><!-- fragment --><p>Full screen windows cover the entire display area of a monitor, have no border or decorations.</p>
|
146
|
+
<p>Windowed mode windows can be made full screen by setting a monitor with <a class="el" href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>, and full screen ones can be made windowed by unsetting it with the same function.</p>
|
147
|
+
<p>Each field of the <a class="el" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a> structure corresponds to a function parameter or window hint and combine to form the <em>desired video mode</em> for that window. The supported video mode most closely matching the desired video mode will be set for the chosen monitor as long as the window has input focus. For more information about retrieving video modes, see <a class="el" href="monitor_guide.html#monitor_modes">Video modes</a>.</p>
|
148
|
+
<table class="markdownTable">
|
149
|
+
<tr class="markdownTableHead">
|
150
|
+
<th class="markdownTableHeadNone">Video mode field </th><th class="markdownTableHeadNone">Corresponds to </th></tr>
|
151
|
+
<tr class="markdownTableRowOdd">
|
152
|
+
<td class="markdownTableBodyNone"><a class="el" href="struct_g_l_f_wvidmode.html#a698dcb200562051a7249cb6ae154c71d">GLFWvidmode.width</a> </td><td class="markdownTableBodyNone"><code>width</code> parameter of <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> </td></tr>
|
153
|
+
<tr class="markdownTableRowEven">
|
154
|
+
<td class="markdownTableBodyNone"><a class="el" href="struct_g_l_f_wvidmode.html#ac65942a5f6981695517437a9d571d03c">GLFWvidmode.height</a> </td><td class="markdownTableBodyNone"><code>height</code> parameter of <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> </td></tr>
|
155
|
+
<tr class="markdownTableRowOdd">
|
156
|
+
<td class="markdownTableBodyNone"><a class="el" href="struct_g_l_f_wvidmode.html#a6066c4ecd251098700062d3b735dba1b">GLFWvidmode.redBits</a> </td><td class="markdownTableBodyNone"><a class="el" href="window_guide.html#GLFW_RED_BITS">GLFW_RED_BITS</a> hint </td></tr>
|
157
|
+
<tr class="markdownTableRowEven">
|
158
|
+
<td class="markdownTableBodyNone"><a class="el" href="struct_g_l_f_wvidmode.html#a292fdd281f3485fb3ff102a5bda43faa">GLFWvidmode.greenBits</a> </td><td class="markdownTableBodyNone"><a class="el" href="window_guide.html#GLFW_GREEN_BITS">GLFW_GREEN_BITS</a> hint </td></tr>
|
159
|
+
<tr class="markdownTableRowOdd">
|
160
|
+
<td class="markdownTableBodyNone"><a class="el" href="struct_g_l_f_wvidmode.html#af310977f58d2e3b188175b6e3d314047">GLFWvidmode.blueBits</a> </td><td class="markdownTableBodyNone"><a class="el" href="window_guide.html#GLFW_BLUE_BITS">GLFW_BLUE_BITS</a> hint </td></tr>
|
161
|
+
<tr class="markdownTableRowEven">
|
162
|
+
<td class="markdownTableBodyNone"><a class="el" href="struct_g_l_f_wvidmode.html#a791bdd6c7697b09f7e9c97054bf05649">GLFWvidmode.refreshRate</a> </td><td class="markdownTableBodyNone"><a class="el" href="window_guide.html#GLFW_REFRESH_RATE">GLFW_REFRESH_RATE</a> hint </td></tr>
|
163
|
+
</table>
|
164
|
+
<p>Once you have a full screen window, you can change its resolution, refresh rate and monitor with <a class="el" href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>. If you only need change its resolution you can also call <a class="el" href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a>. In all cases, the new video mode will be selected the same way as the video mode chosen by <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>. If the window has an OpenGL or OpenGL ES context, it will be unaffected.</p>
|
165
|
+
<p>By default, the original video mode of the monitor will be restored and the window iconified if it loses input focus, to allow the user to switch back to the desktop. This behavior can be disabled with the <a class="el" href="window_guide.html#GLFW_AUTO_ICONIFY_hint">GLFW_AUTO_ICONIFY</a> window hint, for example if you wish to simultaneously cover multiple monitors with full screen windows.</p>
|
166
|
+
<p>If a monitor is disconnected, all windows that are full screen on that monitor will be switched to windowed mode. See <a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a> for more information.</p>
|
167
|
+
<h3><a class="anchor" id="window_windowed_full_screen"></a>
|
168
|
+
"Windowed full screen" windows</h3>
|
169
|
+
<p>If the closest match for the desired video mode is the current one, the video mode will not be changed, making window creation faster and application switching much smoother. This is sometimes called <em>windowed full screen</em> or <em>borderless full screen</em> window and counts as a full screen window. To create such a window, request the current video mode.</p>
|
170
|
+
<div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code hl_struct" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a>* mode = <a class="code hl_function" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a>(monitor);</div>
|
171
|
+
<div class="line"> </div>
|
172
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gaf78ed8e417dbcc1e354906cc2708c982">GLFW_RED_BITS</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a6066c4ecd251098700062d3b735dba1b">redBits</a>);</div>
|
173
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d">GLFW_GREEN_BITS</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a292fdd281f3485fb3ff102a5bda43faa">greenBits</a>);</div>
|
174
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gab292ea403db6d514537b515311bf9ae3">GLFW_BLUE_BITS</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#af310977f58d2e3b188175b6e3d314047">blueBits</a>);</div>
|
175
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#ga0f20825e6e47ee8ba389024519682212">GLFW_REFRESH_RATE</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a791bdd6c7697b09f7e9c97054bf05649">refreshRate</a>);</div>
|
176
|
+
<div class="line"> </div>
|
177
|
+
<div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a698dcb200562051a7249cb6ae154c71d">width</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#ac65942a5f6981695517437a9d571d03c">height</a>, <span class="stringliteral">"My Title"</span>, monitor, NULL);</div>
|
178
|
+
<div class="ttc" id="agroup__monitor_html_gaba376fa7e76634b4788bddc505d6c9d5"><div class="ttname"><a href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a></div><div class="ttdeci">const GLFWvidmode * glfwGetVideoMode(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the current mode of the specified monitor.</div></div>
|
179
|
+
<div class="ttc" id="agroup__window_html_ga0f20825e6e47ee8ba389024519682212"><div class="ttname"><a href="group__window.html#ga0f20825e6e47ee8ba389024519682212">GLFW_REFRESH_RATE</a></div><div class="ttdeci">#define GLFW_REFRESH_RATE</div><div class="ttdoc">Monitor refresh rate hint.</div><div class="ttdef"><b>Definition</b> glfw3.h:939</div></div>
|
180
|
+
<div class="ttc" id="agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033"><div class="ttname"><a href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a></div><div class="ttdeci">void glfwWindowHint(int hint, int value)</div><div class="ttdoc">Sets the specified window hint to the desired value.</div></div>
|
181
|
+
<div class="ttc" id="agroup__window_html_gab292ea403db6d514537b515311bf9ae3"><div class="ttname"><a href="group__window.html#gab292ea403db6d514537b515311bf9ae3">GLFW_BLUE_BITS</a></div><div class="ttdeci">#define GLFW_BLUE_BITS</div><div class="ttdoc">Framebuffer bit depth hint.</div><div class="ttdef"><b>Definition</b> glfw3.h:879</div></div>
|
182
|
+
<div class="ttc" id="agroup__window_html_gaf78ed8e417dbcc1e354906cc2708c982"><div class="ttname"><a href="group__window.html#gaf78ed8e417dbcc1e354906cc2708c982">GLFW_RED_BITS</a></div><div class="ttdeci">#define GLFW_RED_BITS</div><div class="ttdoc">Framebuffer bit depth hint.</div><div class="ttdef"><b>Definition</b> glfw3.h:869</div></div>
|
183
|
+
<div class="ttc" id="agroup__window_html_gafba3b72638c914e5fb8a237dd4c50d4d"><div class="ttname"><a href="group__window.html#gafba3b72638c914e5fb8a237dd4c50d4d">GLFW_GREEN_BITS</a></div><div class="ttdeci">#define GLFW_GREEN_BITS</div><div class="ttdoc">Framebuffer bit depth hint.</div><div class="ttdef"><b>Definition</b> glfw3.h:874</div></div>
|
184
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html"><div class="ttname"><a href="struct_g_l_f_wvidmode.html">GLFWvidmode</a></div><div class="ttdoc">Video mode type.</div><div class="ttdef"><b>Definition</b> glfw3.h:1668</div></div>
|
185
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html_a292fdd281f3485fb3ff102a5bda43faa"><div class="ttname"><a href="struct_g_l_f_wvidmode.html#a292fdd281f3485fb3ff102a5bda43faa">GLFWvidmode::greenBits</a></div><div class="ttdeci">int greenBits</div><div class="ttdef"><b>Definition</b> glfw3.h:1680</div></div>
|
186
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html_a6066c4ecd251098700062d3b735dba1b"><div class="ttname"><a href="struct_g_l_f_wvidmode.html#a6066c4ecd251098700062d3b735dba1b">GLFWvidmode::redBits</a></div><div class="ttdeci">int redBits</div><div class="ttdef"><b>Definition</b> glfw3.h:1677</div></div>
|
187
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html_a698dcb200562051a7249cb6ae154c71d"><div class="ttname"><a href="struct_g_l_f_wvidmode.html#a698dcb200562051a7249cb6ae154c71d">GLFWvidmode::width</a></div><div class="ttdeci">int width</div><div class="ttdef"><b>Definition</b> glfw3.h:1671</div></div>
|
188
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html_a791bdd6c7697b09f7e9c97054bf05649"><div class="ttname"><a href="struct_g_l_f_wvidmode.html#a791bdd6c7697b09f7e9c97054bf05649">GLFWvidmode::refreshRate</a></div><div class="ttdeci">int refreshRate</div><div class="ttdef"><b>Definition</b> glfw3.h:1686</div></div>
|
189
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html_ac65942a5f6981695517437a9d571d03c"><div class="ttname"><a href="struct_g_l_f_wvidmode.html#ac65942a5f6981695517437a9d571d03c">GLFWvidmode::height</a></div><div class="ttdeci">int height</div><div class="ttdef"><b>Definition</b> glfw3.h:1674</div></div>
|
190
|
+
<div class="ttc" id="astruct_g_l_f_wvidmode_html_af310977f58d2e3b188175b6e3d314047"><div class="ttname"><a href="struct_g_l_f_wvidmode.html#af310977f58d2e3b188175b6e3d314047">GLFWvidmode::blueBits</a></div><div class="ttdeci">int blueBits</div><div class="ttdef"><b>Definition</b> glfw3.h:1683</div></div>
|
191
|
+
</div><!-- fragment --><p>This also works for windowed mode windows that are made full screen.</p>
|
192
|
+
<div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code hl_struct" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a>* mode = <a class="code hl_function" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a>(monitor);</div>
|
193
|
+
<div class="line"> </div>
|
194
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>(window, monitor, 0, 0, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a698dcb200562051a7249cb6ae154c71d">width</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#ac65942a5f6981695517437a9d571d03c">height</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a791bdd6c7697b09f7e9c97054bf05649">refreshRate</a>);</div>
|
195
|
+
<div class="ttc" id="agroup__window_html_ga81c76c418af80a1cce7055bccb0ae0a7"><div class="ttname"><a href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a></div><div class="ttdeci">void glfwSetWindowMonitor(GLFWwindow *window, GLFWmonitor *monitor, int xpos, int ypos, int width, int height, int refreshRate)</div><div class="ttdoc">Sets the mode, monitor, video mode and placement of a window.</div></div>
|
196
|
+
</div><!-- fragment --><p>Note that <a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a> returns the <em>current</em> video mode of a monitor, so if you already have a full screen window on that monitor that you want to make windowed full screen, you need to have saved the desktop resolution before.</p>
|
197
|
+
<h2><a class="anchor" id="window_destruction"></a>
|
198
|
+
Window destruction</h2>
|
199
|
+
<p>When a window is no longer needed, destroy it with <a class="el" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a>.</p>
|
200
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a>(window);</div>
|
201
|
+
<div class="ttc" id="agroup__window_html_gacdf43e51376051d2c091662e9fe3d7b2"><div class="ttname"><a href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a></div><div class="ttdeci">void glfwDestroyWindow(GLFWwindow *window)</div><div class="ttdoc">Destroys the specified window and its context.</div></div>
|
202
|
+
</div><!-- fragment --><p>Window destruction always succeeds. Before the actual destruction, all callbacks are removed so no further events will be delivered for the window. All windows remaining when <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> is called are destroyed as well.</p>
|
203
|
+
<p>When a full screen window is destroyed, the original video mode of its monitor is restored, but the gamma ramp is left untouched.</p>
|
204
|
+
<h2><a class="anchor" id="window_hints"></a>
|
205
|
+
Window creation hints</h2>
|
206
|
+
<p>There are a number of hints that can be set before the creation of a window and context. Some affect the window itself, others affect the framebuffer or context. These hints are set to their default values each time the library is initialized with <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>. Integer value hints can be set individually with <a class="el" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a> and string value hints with <a class="el" href="group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f">glfwWindowHintString</a>. You can reset all at once to their defaults with <a class="el" href="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a">glfwDefaultWindowHints</a>.</p>
|
207
|
+
<p>Some hints are platform specific. These are always valid to set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or calls.</p>
|
208
|
+
<dl class="section note"><dt>Note</dt><dd>Window hints need to be set before the creation of the window and context you wish to have the specified attributes. They function as additional arguments to <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>.</dd></dl>
|
209
|
+
<h3><a class="anchor" id="window_hints_hard"></a>
|
210
|
+
Hard and soft constraints</h3>
|
211
|
+
<p>Some window hints are hard constraints. These must match the available capabilities <em>exactly</em> for window and context creation to succeed. Hints that are not hard constraints are matched as closely as possible, but the resulting context and framebuffer may differ from what these hints requested.</p>
|
212
|
+
<p>The following hints are always hard constraints:</p><ul>
|
213
|
+
<li><a class="el" href="window_guide.html#GLFW_STEREO">GLFW_STEREO</a></li>
|
214
|
+
<li><a class="el" href="window_guide.html#GLFW_DOUBLEBUFFER">GLFW_DOUBLEBUFFER</a></li>
|
215
|
+
<li><a class="el" href="window_guide.html#GLFW_CLIENT_API_hint">GLFW_CLIENT_API</a></li>
|
216
|
+
<li><a class="el" href="window_guide.html#GLFW_CONTEXT_CREATION_API_hint">GLFW_CONTEXT_CREATION_API</a></li>
|
217
|
+
</ul>
|
218
|
+
<p>The following additional hints are hard constraints when requesting an OpenGL context, but are ignored when requesting an OpenGL ES context:</p><ul>
|
219
|
+
<li><a class="el" href="window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint">GLFW_OPENGL_FORWARD_COMPAT</a></li>
|
220
|
+
<li><a class="el" href="window_guide.html#GLFW_OPENGL_PROFILE_hint">GLFW_OPENGL_PROFILE</a></li>
|
221
|
+
</ul>
|
222
|
+
<h3><a class="anchor" id="window_hints_wnd"></a>
|
223
|
+
Window related hints</h3>
|
224
|
+
<p><a class="anchor" id="GLFW_RESIZABLE_hint"></a><b>GLFW_RESIZABLE</b> specifies whether the windowed mode window will be resizable <em>by the user</em>. The window will still be resizable using the <a class="el" href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a> function. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen and undecorated windows.</p>
|
225
|
+
<p><a class="anchor" id="GLFW_VISIBLE_hint"></a><b>GLFW_VISIBLE</b> specifies whether the windowed mode window will be initially visible. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>
|
226
|
+
<p><a class="anchor" id="GLFW_DECORATED_hint"></a><b>GLFW_DECORATED</b> specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window will not be resizable by the user but will still allow the user to generate close events on some platforms. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>
|
227
|
+
<p><a class="anchor" id="GLFW_FOCUSED_hint"></a><b>GLFW_FOCUSED</b> specifies whether the windowed mode window will be given input focus when created. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen and initially hidden windows.</p>
|
228
|
+
<p><a class="anchor" id="GLFW_AUTO_ICONIFY_hint"></a><b>GLFW_AUTO_ICONIFY</b> specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for windowed mode windows.</p>
|
229
|
+
<p><a class="anchor" id="GLFW_FLOATING_hint"></a><b>GLFW_FLOATING</b> specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>
|
230
|
+
<p><a class="anchor" id="GLFW_MAXIMIZED_hint"></a><b>GLFW_MAXIMIZED</b> specifies whether the windowed mode window will be maximized when created. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for full screen windows.</p>
|
231
|
+
<p><a class="anchor" id="GLFW_CENTER_CURSOR_hint"></a><b>GLFW_CENTER_CURSOR</b> specifies whether the cursor should be centered over newly created full screen windows. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This hint is ignored for windowed mode windows.</p>
|
232
|
+
<p><a class="anchor" id="GLFW_TRANSPARENT_FRAMEBUFFER_hint"></a><b>GLFW_TRANSPARENT_FRAMEBUFFER</b> specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
233
|
+
<p><a class="anchor" id="GLFW_FOCUS_ON_SHOW_hint"></a><b>GLFW_FOCUS_ON_SHOW</b> specifies whether the window will be given input focus when <a class="el" href="group__window.html#ga61be47917b72536a148300f46494fc66">glfwShowWindow</a> is called. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
234
|
+
<p><a class="anchor" id="GLFW_SCALE_TO_MONITOR"></a><b>GLFW_SCALE_TO_MONITOR</b> specified whether the window content area should be resized based on the <a class="el" href="monitor_guide.html#monitor_scale">monitor content scale</a> of any monitor it is placed on. This includes the initial placement when the window is created. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
235
|
+
<p>This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.</p>
|
236
|
+
<h3><a class="anchor" id="window_hints_fb"></a>
|
237
|
+
Framebuffer related hints</h3>
|
238
|
+
<p><a class="anchor" id="GLFW_RED_BITS"></a><a class="anchor" id="GLFW_GREEN_BITS"></a><a class="anchor" id="GLFW_BLUE_BITS"></a><a class="anchor" id="GLFW_ALPHA_BITS"></a><a class="anchor" id="GLFW_DEPTH_BITS"></a><a class="anchor" id="GLFW_STENCIL_BITS"></a><b>GLFW_RED_BITS</b>, <b>GLFW_GREEN_BITS</b>, <b>GLFW_BLUE_BITS</b>, <b>GLFW_ALPHA_BITS</b>, <b>GLFW_DEPTH_BITS</b> and <b>GLFW_STENCIL_BITS</b> specify the desired bit depths of the various components of the default framebuffer. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>
|
239
|
+
<p><a class="anchor" id="GLFW_ACCUM_RED_BITS"></a><a class="anchor" id="GLFW_ACCUM_GREEN_BITS"></a><a class="anchor" id="GLFW_ACCUM_BLUE_BITS"></a><a class="anchor" id="GLFW_ACCUM_ALPHA_BITS"></a><b>GLFW_ACCUM_RED_BITS</b>, <b>GLFW_ACCUM_GREEN_BITS</b>, <b>GLFW_ACCUM_BLUE_BITS</b> and <b>GLFW_ACCUM_ALPHA_BITS</b> specify the desired bit depths of the various components of the accumulation buffer. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>
|
240
|
+
<p>Accumulation buffers are a legacy OpenGL feature and should not be used in new code.</p>
|
241
|
+
<p><a class="anchor" id="GLFW_AUX_BUFFERS"></a><b>GLFW_AUX_BUFFERS</b> specifies the desired number of auxiliary buffers. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>
|
242
|
+
<p>Auxiliary buffers are a legacy OpenGL feature and should not be used in new code.</p>
|
243
|
+
<p><a class="anchor" id="GLFW_STEREO"></a><b>GLFW_STEREO</b> specifies whether to use OpenGL stereoscopic rendering. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This is a hard constraint.</p>
|
244
|
+
<p><a class="anchor" id="GLFW_SAMPLES"></a><b>GLFW_SAMPLES</b> specifies the desired number of samples to use for multisampling. Zero disables multisampling. A value of <code>GLFW_DONT_CARE</code> means the application has no preference.</p>
|
245
|
+
<p><a class="anchor" id="GLFW_SRGB_CAPABLE"></a><b>GLFW_SRGB_CAPABLE</b> specifies whether the framebuffer should be sRGB capable. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
246
|
+
<dl class="section note"><dt>Note</dt><dd><b>OpenGL:</b> If enabled and supported by the system, the <code>GL_FRAMEBUFFER_SRGB</code> enable will control sRGB rendering. By default, sRGB rendering will be disabled.</dd>
|
247
|
+
<dd>
|
248
|
+
<b>OpenGL ES:</b> If enabled and supported by the system, the context will always have sRGB rendering enabled.</dd></dl>
|
249
|
+
<p><a class="anchor" id="GLFW_DOUBLEBUFFER"></a><b>GLFW_DOUBLEBUFFER</b> specifies whether the framebuffer should be double buffered. You nearly always want to use double buffering. This is a hard constraint. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
250
|
+
<h3><a class="anchor" id="window_hints_mtr"></a>
|
251
|
+
Monitor related hints</h3>
|
252
|
+
<p><a class="anchor" id="GLFW_REFRESH_RATE"></a><b>GLFW_REFRESH_RATE</b> specifies the desired refresh rate for full screen windows. A value of <code>GLFW_DONT_CARE</code> means the highest available refresh rate will be used. This hint is ignored for windowed mode windows.</p>
|
253
|
+
<h3><a class="anchor" id="window_hints_ctx"></a>
|
254
|
+
Context related hints</h3>
|
255
|
+
<p><a class="anchor" id="GLFW_CLIENT_API_hint"></a><b>GLFW_CLIENT_API</b> specifies which client API to create the context for. Possible values are <code>GLFW_OPENGL_API</code>, <code>GLFW_OPENGL_ES_API</code> and <code>GLFW_NO_API</code>. This is a hard constraint.</p>
|
256
|
+
<p><a class="anchor" id="GLFW_CONTEXT_CREATION_API_hint"></a><b>GLFW_CONTEXT_CREATION_API</b> specifies which context creation API to use to create the context. Possible values are <code>GLFW_NATIVE_CONTEXT_API</code>, <code>GLFW_EGL_CONTEXT_API</code> and <code>GLFW_OSMESA_CONTEXT_API</code>. This is a hard constraint. If no client API is requested, this hint is ignored.</p>
|
257
|
+
<p>An <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a> that assumes it knows which API was used to create the current context may fail if you change this hint. This can be resolved by having it load functions via <a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>.</p>
|
258
|
+
<dl class="section note"><dt>Note</dt><dd><b>Wayland:</b> The EGL API <em>is</em> the native context creation API, so this hint will have no effect.</dd>
|
259
|
+
<dd>
|
260
|
+
<b>X11:</b> On some Linux systems, creating contexts via both the native and EGL APIs in a single process will cause the application to segfault. Stick to one API or the other on Linux for now.</dd>
|
261
|
+
<dd>
|
262
|
+
<b>OSMesa:</b> As its name implies, an OpenGL context created with OSMesa does not update the window contents when its buffers are swapped. Use OpenGL functions or the OSMesa native access functions <a class="el" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a> and <a class="el" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a> to retrieve the framebuffer contents.</dd></dl>
|
263
|
+
<p><a class="anchor" id="GLFW_CONTEXT_VERSION_MAJOR_hint"></a><a class="anchor" id="GLFW_CONTEXT_VERSION_MINOR_hint"></a><b>GLFW_CONTEXT_VERSION_MAJOR</b> and <b>GLFW_CONTEXT_VERSION_MINOR</b> specify the client API version that the created context must be compatible with. The exact behavior of these hints depend on the requested client API.</p>
|
264
|
+
<p>While there is no way to ask the driver for a context of the highest supported version, GLFW will attempt to provide this when you ask for a version 1.0 context, which is the default for these hints.</p>
|
265
|
+
<p>Do not confuse these hints with <a class="el" href="group__init.html#ga6337d9ea43b22fc529b2bba066b4a576">GLFW_VERSION_MAJOR</a> and <a class="el" href="group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3">GLFW_VERSION_MINOR</a>, which provide the API version of the GLFW header.</p>
|
266
|
+
<dl class="section note"><dt>Note</dt><dd><b>OpenGL:</b> These hints are not hard constraints, but creation will fail if the OpenGL version of the created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will still get backwards-compatible contexts of version 3.0 and above when available.</dd>
|
267
|
+
<dd>
|
268
|
+
<b>OpenGL ES:</b> These hints are not hard constraints, but creation will fail if the OpenGL ES version of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.</dd>
|
269
|
+
<dd>
|
270
|
+
<b>macOS:</b> The OS only supports forward-compatible core profile contexts for OpenGL versions 3.2 and later. Before creating an OpenGL context of version 3.2 or later you must set the <a class="el" href="window_guide.html#GLFW_OPENGL_FORWARD_COMPAT_hint">GLFW_OPENGL_FORWARD_COMPAT</a> and <a class="el" href="window_guide.html#GLFW_OPENGL_PROFILE_hint">GLFW_OPENGL_PROFILE</a> hints accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.</dd></dl>
|
271
|
+
<p><a class="anchor" id="GLFW_OPENGL_FORWARD_COMPAT_hint"></a><b>GLFW_OPENGL_FORWARD_COMPAT</b> specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is ignored.</p>
|
272
|
+
<p>Forward-compatibility is described in detail in the <a href="https://www.opengl.org/registry/">OpenGL Reference Manual</a>.</p>
|
273
|
+
<p><a class="anchor" id="GLFW_OPENGL_DEBUG_CONTEXT_hint"></a><b>GLFW_OPENGL_DEBUG_CONTEXT</b> specifies whether the context should be created in debug mode, which may provide additional error and diagnostic reporting functionality. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
274
|
+
<p>Debug contexts for OpenGL and OpenGL ES are described in detail by the <a href="https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_debug.txt">GL_KHR_debug</a> extension.</p>
|
275
|
+
<p><a class="anchor" id="GLFW_OPENGL_PROFILE_hint"></a><b>GLFW_OPENGL_PROFILE</b> specifies which OpenGL profile to create the context for. Possible values are one of <code>GLFW_OPENGL_CORE_PROFILE</code> or <code>GLFW_OPENGL_COMPAT_PROFILE</code>, or <code>GLFW_OPENGL_ANY_PROFILE</code> to not request a specific profile. If requesting an OpenGL version below 3.2, <code>GLFW_OPENGL_ANY_PROFILE</code> must be used. If OpenGL ES is requested, this hint is ignored.</p>
|
276
|
+
<p>OpenGL profiles are described in detail in the <a href="https://www.opengl.org/registry/">OpenGL Reference Manual</a>.</p>
|
277
|
+
<p><a class="anchor" id="GLFW_CONTEXT_ROBUSTNESS_hint"></a><b>GLFW_CONTEXT_ROBUSTNESS</b> specifies the robustness strategy to be used by the context. This can be one of <code>GLFW_NO_RESET_NOTIFICATION</code> or <code>GLFW_LOSE_CONTEXT_ON_RESET</code>, or <code>GLFW_NO_ROBUSTNESS</code> to not request a robustness strategy.</p>
|
278
|
+
<p><a class="anchor" id="GLFW_CONTEXT_RELEASE_BEHAVIOR_hint"></a><b>GLFW_CONTEXT_RELEASE_BEHAVIOR</b> specifies the release behavior to be used by the context. Possible values are one of <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code> or <code>GLFW_RELEASE_BEHAVIOR_NONE</code>. If the behavior is <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, the default behavior of the context creation API will be used. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code>, the pipeline will be flushed whenever the context is released from being the current one. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_NONE</code>, the pipeline will not be flushed on release.</p>
|
279
|
+
<p>Context release behaviors are described in detail by the <a href="https://www.opengl.org/registry/specs/KHR/context_flush_control.txt">GL_KHR_context_flush_control</a> extension.</p>
|
280
|
+
<p><a class="anchor" id="GLFW_CONTEXT_NO_ERROR_hint"></a><b>GLFW_CONTEXT_NO_ERROR</b> specifies whether errors should be generated by the context. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. If enabled, situations that would have generated errors instead cause undefined behavior.</p>
|
281
|
+
<p>The no error mode for OpenGL and OpenGL ES is described in detail by the <a href="https://www.opengl.org/registry/specs/KHR/no_error.txt">GL_KHR_no_error</a> extension.</p>
|
282
|
+
<h3><a class="anchor" id="window_hints_osx"></a>
|
283
|
+
macOS specific window hints</h3>
|
284
|
+
<p><a class="anchor" id="GLFW_COCOA_RETINA_FRAMEBUFFER_hint"></a><b>GLFW_COCOA_RETINA_FRAMEBUFFER</b> specifies whether to use full resolution framebuffers on Retina displays. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This is ignored on other platforms.</p>
|
285
|
+
<p><a class="anchor" id="GLFW_COCOA_FRAME_NAME_hint"></a><b>GLFW_COCOA_FRAME_NAME</b> specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window. This is ignored on other platforms. This is set with <a class="el" href="group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f">glfwWindowHintString</a>.</p>
|
286
|
+
<p><a class="anchor" id="GLFW_COCOA_GRAPHICS_SWITCHING_hint"></a><b>GLFW_COCOA_GRAPHICS_SWITCHING</b> specifies whether to in Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it between GPUs if necessary or whether to force it to always run on the discrete GPU. This only affects systems with both integrated and discrete GPUs. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. This is ignored on other platforms.</p>
|
287
|
+
<p>Simpler programs and tools may want to enable this to save power, while games and other applications performing advanced rendering will want to leave it disabled.</p>
|
288
|
+
<p>A bundled application that wishes to participate in Automatic Graphics Switching should also declare this in its <code>Info.plist</code> by setting the <code>NSSupportsAutomaticGraphicsSwitching</code> key to <code>true</code>.</p>
|
289
|
+
<h3><a class="anchor" id="window_hints_x11"></a>
|
290
|
+
X11 specific window hints</h3>
|
291
|
+
<p><a class="anchor" id="GLFW_X11_CLASS_NAME_hint"></a><a class="anchor" id="GLFW_X11_INSTANCE_NAME_hint"></a><b>GLFW_X11_CLASS_NAME</b> and <b>GLFW_X11_INSTANCE_NAME</b> specifies the desired ASCII encoded class and instance parts of the ICCCM <code>WM_CLASS</code> window property. Both hints need to be set to something other than an empty string for them to take effect. These are set with <a class="el" href="group__window.html#ga8cb2782861c9d997bcf2dea97f363e5f">glfwWindowHintString</a>.</p>
|
292
|
+
<h3><a class="anchor" id="window_hints_values"></a>
|
293
|
+
Supported and default values</h3>
|
294
|
+
<table class="markdownTable">
|
295
|
+
<tr class="markdownTableHead">
|
296
|
+
<th class="markdownTableHeadNone">Window hint </th><th class="markdownTableHeadNone">Default value </th><th class="markdownTableHeadNone">Supported values </th></tr>
|
297
|
+
<tr class="markdownTableRowOdd">
|
298
|
+
<td class="markdownTableBodyNone">GLFW_RESIZABLE </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
299
|
+
<tr class="markdownTableRowEven">
|
300
|
+
<td class="markdownTableBodyNone">GLFW_VISIBLE </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
301
|
+
<tr class="markdownTableRowOdd">
|
302
|
+
<td class="markdownTableBodyNone">GLFW_DECORATED </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
303
|
+
<tr class="markdownTableRowEven">
|
304
|
+
<td class="markdownTableBodyNone">GLFW_FOCUSED </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
305
|
+
<tr class="markdownTableRowOdd">
|
306
|
+
<td class="markdownTableBodyNone">GLFW_AUTO_ICONIFY </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
307
|
+
<tr class="markdownTableRowEven">
|
308
|
+
<td class="markdownTableBodyNone">GLFW_FLOATING </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
309
|
+
<tr class="markdownTableRowOdd">
|
310
|
+
<td class="markdownTableBodyNone">GLFW_MAXIMIZED </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
311
|
+
<tr class="markdownTableRowEven">
|
312
|
+
<td class="markdownTableBodyNone">GLFW_CENTER_CURSOR </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
313
|
+
<tr class="markdownTableRowOdd">
|
314
|
+
<td class="markdownTableBodyNone">GLFW_TRANSPARENT_FRAMEBUFFER </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
315
|
+
<tr class="markdownTableRowEven">
|
316
|
+
<td class="markdownTableBodyNone">GLFW_FOCUS_ON_SHOW </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
317
|
+
<tr class="markdownTableRowOdd">
|
318
|
+
<td class="markdownTableBodyNone">GLFW_SCALE_TO_MONITOR </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
319
|
+
<tr class="markdownTableRowEven">
|
320
|
+
<td class="markdownTableBodyNone">GLFW_RED_BITS </td><td class="markdownTableBodyNone">8 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
321
|
+
<tr class="markdownTableRowOdd">
|
322
|
+
<td class="markdownTableBodyNone">GLFW_GREEN_BITS </td><td class="markdownTableBodyNone">8 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
323
|
+
<tr class="markdownTableRowEven">
|
324
|
+
<td class="markdownTableBodyNone">GLFW_BLUE_BITS </td><td class="markdownTableBodyNone">8 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
325
|
+
<tr class="markdownTableRowOdd">
|
326
|
+
<td class="markdownTableBodyNone">GLFW_ALPHA_BITS </td><td class="markdownTableBodyNone">8 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
327
|
+
<tr class="markdownTableRowEven">
|
328
|
+
<td class="markdownTableBodyNone">GLFW_DEPTH_BITS </td><td class="markdownTableBodyNone">24 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
329
|
+
<tr class="markdownTableRowOdd">
|
330
|
+
<td class="markdownTableBodyNone">GLFW_STENCIL_BITS </td><td class="markdownTableBodyNone">8 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
331
|
+
<tr class="markdownTableRowEven">
|
332
|
+
<td class="markdownTableBodyNone">GLFW_ACCUM_RED_BITS </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
333
|
+
<tr class="markdownTableRowOdd">
|
334
|
+
<td class="markdownTableBodyNone">GLFW_ACCUM_GREEN_BITS </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
335
|
+
<tr class="markdownTableRowEven">
|
336
|
+
<td class="markdownTableBodyNone">GLFW_ACCUM_BLUE_BITS </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
337
|
+
<tr class="markdownTableRowOdd">
|
338
|
+
<td class="markdownTableBodyNone">GLFW_ACCUM_ALPHA_BITS </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
339
|
+
<tr class="markdownTableRowEven">
|
340
|
+
<td class="markdownTableBodyNone">GLFW_AUX_BUFFERS </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
341
|
+
<tr class="markdownTableRowOdd">
|
342
|
+
<td class="markdownTableBodyNone">GLFW_SAMPLES </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
343
|
+
<tr class="markdownTableRowEven">
|
344
|
+
<td class="markdownTableBodyNone">GLFW_REFRESH_RATE </td><td class="markdownTableBodyNone"><code>GLFW_DONT_CARE</code> </td><td class="markdownTableBodyNone">0 to <code>INT_MAX</code> or <code>GLFW_DONT_CARE</code> </td></tr>
|
345
|
+
<tr class="markdownTableRowOdd">
|
346
|
+
<td class="markdownTableBodyNone">GLFW_STEREO </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
347
|
+
<tr class="markdownTableRowEven">
|
348
|
+
<td class="markdownTableBodyNone">GLFW_SRGB_CAPABLE </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
349
|
+
<tr class="markdownTableRowOdd">
|
350
|
+
<td class="markdownTableBodyNone">GLFW_DOUBLEBUFFER </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
351
|
+
<tr class="markdownTableRowEven">
|
352
|
+
<td class="markdownTableBodyNone">GLFW_CLIENT_API </td><td class="markdownTableBodyNone"><code>GLFW_OPENGL_API</code> </td><td class="markdownTableBodyNone"><code>GLFW_OPENGL_API</code>, <code>GLFW_OPENGL_ES_API</code> or <code>GLFW_NO_API</code> </td></tr>
|
353
|
+
<tr class="markdownTableRowOdd">
|
354
|
+
<td class="markdownTableBodyNone">GLFW_CONTEXT_CREATION_API </td><td class="markdownTableBodyNone"><code>GLFW_NATIVE_CONTEXT_API</code> </td><td class="markdownTableBodyNone"><code>GLFW_NATIVE_CONTEXT_API</code>, <code>GLFW_EGL_CONTEXT_API</code> or <code>GLFW_OSMESA_CONTEXT_API</code> </td></tr>
|
355
|
+
<tr class="markdownTableRowEven">
|
356
|
+
<td class="markdownTableBodyNone">GLFW_CONTEXT_VERSION_MAJOR </td><td class="markdownTableBodyNone">1 </td><td class="markdownTableBodyNone">Any valid major version number of the chosen client API </td></tr>
|
357
|
+
<tr class="markdownTableRowOdd">
|
358
|
+
<td class="markdownTableBodyNone">GLFW_CONTEXT_VERSION_MINOR </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">Any valid minor version number of the chosen client API </td></tr>
|
359
|
+
<tr class="markdownTableRowEven">
|
360
|
+
<td class="markdownTableBodyNone">GLFW_CONTEXT_ROBUSTNESS </td><td class="markdownTableBodyNone"><code>GLFW_NO_ROBUSTNESS</code> </td><td class="markdownTableBodyNone"><code>GLFW_NO_ROBUSTNESS</code>, <code>GLFW_NO_RESET_NOTIFICATION</code> or <code>GLFW_LOSE_CONTEXT_ON_RESET</code> </td></tr>
|
361
|
+
<tr class="markdownTableRowOdd">
|
362
|
+
<td class="markdownTableBodyNone">GLFW_CONTEXT_RELEASE_BEHAVIOR </td><td class="markdownTableBodyNone"><code>GLFW_ANY_RELEASE_BEHAVIOR</code> </td><td class="markdownTableBodyNone"><code>GLFW_ANY_RELEASE_BEHAVIOR</code>, <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code> or <code>GLFW_RELEASE_BEHAVIOR_NONE</code> </td></tr>
|
363
|
+
<tr class="markdownTableRowEven">
|
364
|
+
<td class="markdownTableBodyNone">GLFW_OPENGL_FORWARD_COMPAT </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
365
|
+
<tr class="markdownTableRowOdd">
|
366
|
+
<td class="markdownTableBodyNone">GLFW_OPENGL_DEBUG_CONTEXT </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
367
|
+
<tr class="markdownTableRowEven">
|
368
|
+
<td class="markdownTableBodyNone">GLFW_OPENGL_PROFILE </td><td class="markdownTableBodyNone"><code>GLFW_OPENGL_ANY_PROFILE</code> </td><td class="markdownTableBodyNone"><code>GLFW_OPENGL_ANY_PROFILE</code>, <code>GLFW_OPENGL_COMPAT_PROFILE</code> or <code>GLFW_OPENGL_CORE_PROFILE</code> </td></tr>
|
369
|
+
<tr class="markdownTableRowOdd">
|
370
|
+
<td class="markdownTableBodyNone">GLFW_COCOA_RETINA_FRAMEBUFFER </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
371
|
+
<tr class="markdownTableRowEven">
|
372
|
+
<td class="markdownTableBodyNone">GLFW_COCOA_FRAME_NAME </td><td class="markdownTableBodyNone"><code>""</code> </td><td class="markdownTableBodyNone">A UTF-8 encoded frame autosave name </td></tr>
|
373
|
+
<tr class="markdownTableRowOdd">
|
374
|
+
<td class="markdownTableBodyNone">GLFW_COCOA_GRAPHICS_SWITCHING </td><td class="markdownTableBodyNone"><code>GLFW_FALSE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
375
|
+
<tr class="markdownTableRowEven">
|
376
|
+
<td class="markdownTableBodyNone">GLFW_X11_CLASS_NAME </td><td class="markdownTableBodyNone"><code>""</code> </td><td class="markdownTableBodyNone">An ASCII encoded <code>WM_CLASS</code> class name </td></tr>
|
377
|
+
<tr class="markdownTableRowOdd">
|
378
|
+
<td class="markdownTableBodyNone">GLFW_X11_INSTANCE_NAME </td><td class="markdownTableBodyNone"><code>""</code> </td><td class="markdownTableBodyNone">An ASCII encoded <code>WM_CLASS</code> instance name </td></tr>
|
379
|
+
</table>
|
380
|
+
<h1><a class="anchor" id="window_events"></a>
|
381
|
+
Window event processing</h1>
|
382
|
+
<p>See <a class="el" href="input_guide.html#events">Event processing</a>.</p>
|
383
|
+
<h1><a class="anchor" id="window_properties"></a>
|
384
|
+
Window properties and events</h1>
|
385
|
+
<h2><a class="anchor" id="window_userptr"></a>
|
386
|
+
User pointer</h2>
|
387
|
+
<p>Each window has a user pointer that can be set with <a class="el" href="group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651">glfwSetWindowUserPointer</a> and queried with <a class="el" href="group__window.html#gae77a4add0d2023ca21ff1443ced01653">glfwGetWindowUserPointer</a>. This can be used for any purpose you need and will not be modified by GLFW throughout the life-time of the window.</p>
|
388
|
+
<p>The initial value of the pointer is <code>NULL</code>.</p>
|
389
|
+
<h2><a class="anchor" id="window_close"></a>
|
390
|
+
Window closing and close flag</h2>
|
391
|
+
<p>When the user attempts to close the window, for example by clicking the close widget or using a key chord like Alt+F4, the <em>close flag</em> of the window is set. The window is however not actually destroyed and, unless you watch for this state change, nothing further happens.</p>
|
392
|
+
<p>The current state of the close flag is returned by <a class="el" href="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">glfwWindowShouldClose</a> and can be set or cleared directly with <a class="el" href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a>. A common pattern is to use the close flag as a main loop condition.</p>
|
393
|
+
<div class="fragment"><div class="line"><span class="keywordflow">while</span> (!<a class="code hl_function" href="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">glfwWindowShouldClose</a>(window))</div>
|
394
|
+
<div class="line">{</div>
|
395
|
+
<div class="line"> render(window);</div>
|
396
|
+
<div class="line"> </div>
|
397
|
+
<div class="line"> <a class="code hl_function" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>(window);</div>
|
398
|
+
<div class="line"> <a class="code hl_function" href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>();</div>
|
399
|
+
<div class="line">}</div>
|
400
|
+
<div class="ttc" id="agroup__window_html_ga15a5a1ee5b3c2ca6b15ca209a12efd14"><div class="ttname"><a href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a></div><div class="ttdeci">void glfwSwapBuffers(GLFWwindow *window)</div><div class="ttdoc">Swaps the front and back buffers of the specified window.</div></div>
|
401
|
+
<div class="ttc" id="agroup__window_html_ga24e02fbfefbb81fc45320989f8140ab5"><div class="ttname"><a href="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">glfwWindowShouldClose</a></div><div class="ttdeci">int glfwWindowShouldClose(GLFWwindow *window)</div><div class="ttdoc">Checks the close flag of the specified window.</div></div>
|
402
|
+
<div class="ttc" id="agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832"><div class="ttname"><a href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a></div><div class="ttdeci">void glfwPollEvents(void)</div><div class="ttdoc">Processes all pending events.</div></div>
|
403
|
+
</div><!-- fragment --><p>If you wish to be notified when the user attempts to close a window, set a close callback.</p>
|
404
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gada646d775a7776a95ac000cfc1885331">glfwSetWindowCloseCallback</a>(window, window_close_callback);</div>
|
405
|
+
<div class="ttc" id="agroup__window_html_gada646d775a7776a95ac000cfc1885331"><div class="ttname"><a href="group__window.html#gada646d775a7776a95ac000cfc1885331">glfwSetWindowCloseCallback</a></div><div class="ttdeci">GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow *window, GLFWwindowclosefun callback)</div><div class="ttdoc">Sets the close callback for the specified window.</div></div>
|
406
|
+
</div><!-- fragment --><p>The callback function is called directly <em>after</em> the close flag has been set. It can be used for example to filter close requests and clear the close flag again unless certain conditions are met.</p>
|
407
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_close_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window)</div>
|
408
|
+
<div class="line">{</div>
|
409
|
+
<div class="line"> <span class="keywordflow">if</span> (!time_to_close)</div>
|
410
|
+
<div class="line"> <a class="code hl_function" href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a>(window, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
|
411
|
+
<div class="line">}</div>
|
412
|
+
<div class="ttc" id="agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5"><div class="ttname"><a href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a></div><div class="ttdeci">#define GLFW_FALSE</div><div class="ttdoc">Zero.</div><div class="ttdef"><b>Definition</b> glfw3.h:321</div></div>
|
413
|
+
<div class="ttc" id="agroup__window_html_ga49c449dde2a6f87d996f4daaa09d6708"><div class="ttname"><a href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a></div><div class="ttdeci">void glfwSetWindowShouldClose(GLFWwindow *window, int value)</div><div class="ttdoc">Sets the close flag of the specified window.</div></div>
|
414
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_size"></a>
|
415
|
+
Window size</h2>
|
416
|
+
<p>The size of a window can be changed with <a class="el" href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a>. For windowed mode windows, this sets the size, in <a class="el" href="intro_guide.html#coordinate_systems">screen coordinates</a> of the <em>content area</em> or <em>content area</em> of the window. The window system may impose limits on window size.</p>
|
417
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a>(window, 640, 480);</div>
|
418
|
+
<div class="ttc" id="agroup__window_html_ga371911f12c74c504dd8d47d832d095cb"><div class="ttname"><a href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a></div><div class="ttdeci">void glfwSetWindowSize(GLFWwindow *window, int width, int height)</div><div class="ttdoc">Sets the size of the content area of the specified window.</div></div>
|
419
|
+
</div><!-- fragment --><p>For full screen windows, the specified size becomes the new resolution of the window's desired video mode. The video mode most closely matching the new desired video mode is set immediately. The window is resized to fit the resolution of the set video mode.</p>
|
420
|
+
<p>If you wish to be notified when a window is resized, whether by the user, the system or your own code, set a size callback.</p>
|
421
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gad91b8b047a0c4c6033c38853864c34f8">glfwSetWindowSizeCallback</a>(window, window_size_callback);</div>
|
422
|
+
<div class="ttc" id="agroup__window_html_gad91b8b047a0c4c6033c38853864c34f8"><div class="ttname"><a href="group__window.html#gad91b8b047a0c4c6033c38853864c34f8">glfwSetWindowSizeCallback</a></div><div class="ttdeci">GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow *window, GLFWwindowsizefun callback)</div><div class="ttdoc">Sets the size callback for the specified window.</div></div>
|
423
|
+
</div><!-- fragment --><p>The callback function receives the new size, in screen coordinates, of the content area of the window when the window is resized.</p>
|
424
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_size_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height)</div>
|
425
|
+
<div class="line">{</div>
|
426
|
+
<div class="line">}</div>
|
427
|
+
</div><!-- fragment --><p>There is also <a class="el" href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a> for directly retrieving the current size of a window.</p>
|
428
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> width, height;</div>
|
429
|
+
<div class="line"><a class="code hl_function" href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a>(window, &width, &height);</div>
|
430
|
+
<div class="ttc" id="agroup__window_html_gaeea7cbc03373a41fb51cfbf9f2a5d4c6"><div class="ttname"><a href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a></div><div class="ttdeci">void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)</div><div class="ttdoc">Retrieves the size of the content area of the specified window.</div></div>
|
431
|
+
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Do not pass the window size to <code>glViewport</code> or other pixel-based OpenGL calls. The window size is in screen coordinates, not pixels. Use the <a class="el" href="window_guide.html#window_fbsize">framebuffer size</a>, which is in pixels, for pixel-based calls.</dd></dl>
|
432
|
+
<p>The above functions work with the size of the content area, but decorated windows typically have title bars and window frames around this rectangle. You can retrieve the extents of these with <a class="el" href="group__window.html#ga1a9fd382058c53101b21cf211898f1f1">glfwGetWindowFrameSize</a>.</p>
|
433
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> left, top, right, bottom;</div>
|
434
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga1a9fd382058c53101b21cf211898f1f1">glfwGetWindowFrameSize</a>(window, &left, &top, &right, &bottom);</div>
|
435
|
+
<div class="ttc" id="agroup__window_html_ga1a9fd382058c53101b21cf211898f1f1"><div class="ttname"><a href="group__window.html#ga1a9fd382058c53101b21cf211898f1f1">glfwGetWindowFrameSize</a></div><div class="ttdeci">void glfwGetWindowFrameSize(GLFWwindow *window, int *left, int *top, int *right, int *bottom)</div><div class="ttdoc">Retrieves the size of the frame of the window.</div></div>
|
436
|
+
</div><!-- fragment --><p>The returned values are the distances, in screen coordinates, from the edges of the content area to the corresponding edges of the full window. As they are distances and not coordinates, they are always zero or positive.</p>
|
437
|
+
<h2><a class="anchor" id="window_fbsize"></a>
|
438
|
+
Framebuffer size</h2>
|
439
|
+
<p>While the size of a window is measured in screen coordinates, OpenGL works with pixels. The size you pass into <code>glViewport</code>, for example, should be in pixels. On some machines screen coordinates and pixels are the same, but on others they will not be. There is a second set of functions to retrieve the size, in pixels, of the framebuffer of a window.</p>
|
440
|
+
<p>If you wish to be notified when the framebuffer of a window is resized, whether by the user or the system, set a size callback.</p>
|
441
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gab3fb7c3366577daef18c0023e2a8591f">glfwSetFramebufferSizeCallback</a>(window, framebuffer_size_callback);</div>
|
442
|
+
<div class="ttc" id="agroup__window_html_gab3fb7c3366577daef18c0023e2a8591f"><div class="ttname"><a href="group__window.html#gab3fb7c3366577daef18c0023e2a8591f">glfwSetFramebufferSizeCallback</a></div><div class="ttdeci">GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow *window, GLFWframebuffersizefun callback)</div><div class="ttdoc">Sets the framebuffer resize callback for the specified window.</div></div>
|
443
|
+
</div><!-- fragment --><p>The callback function receives the new size of the framebuffer when it is resized, which can for example be used to update the OpenGL viewport.</p>
|
444
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> framebuffer_size_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height)</div>
|
445
|
+
<div class="line">{</div>
|
446
|
+
<div class="line"> glViewport(0, 0, width, height);</div>
|
447
|
+
<div class="line">}</div>
|
448
|
+
</div><!-- fragment --><p>There is also <a class="el" href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a> for directly retrieving the current size of the framebuffer of a window.</p>
|
449
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> width, height;</div>
|
450
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a>(window, &width, &height);</div>
|
451
|
+
<div class="line">glViewport(0, 0, width, height);</div>
|
452
|
+
<div class="ttc" id="agroup__window_html_ga0e2637a4161afb283f5300c7f94785c9"><div class="ttname"><a href="group__window.html#ga0e2637a4161afb283f5300c7f94785c9">glfwGetFramebufferSize</a></div><div class="ttdeci">void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)</div><div class="ttdoc">Retrieves the size of the framebuffer of the specified window.</div></div>
|
453
|
+
</div><!-- fragment --><p>The size of a framebuffer may change independently of the size of a window, for example if the window is dragged between a regular monitor and a high-DPI one.</p>
|
454
|
+
<h2><a class="anchor" id="window_scale"></a>
|
455
|
+
Window content scale</h2>
|
456
|
+
<p>The content scale for a window can be retrieved with <a class="el" href="group__window.html#gaf5d31de9c19c4f994facea64d2b3106c">glfwGetWindowContentScale</a>.</p>
|
457
|
+
<div class="fragment"><div class="line"><span class="keywordtype">float</span> xscale, yscale;</div>
|
458
|
+
<div class="line"><a class="code hl_function" href="group__window.html#gaf5d31de9c19c4f994facea64d2b3106c">glfwGetWindowContentScale</a>(window, &xscale, &yscale);</div>
|
459
|
+
<div class="ttc" id="agroup__window_html_gaf5d31de9c19c4f994facea64d2b3106c"><div class="ttname"><a href="group__window.html#gaf5d31de9c19c4f994facea64d2b3106c">glfwGetWindowContentScale</a></div><div class="ttdeci">void glfwGetWindowContentScale(GLFWwindow *window, float *xscale, float *yscale)</div><div class="ttdoc">Retrieves the content scale for the specified window.</div></div>
|
460
|
+
</div><!-- fragment --><p>The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>
|
461
|
+
<p>On systems where each monitors can have its own content scale, the window content scale will depend on which monitor the system considers the window to be on.</p>
|
462
|
+
<p>If you wish to be notified when the content scale of a window changes, whether because of a system setting change or because it was moved to a monitor with a different scale, set a content scale callback.</p>
|
463
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6">glfwSetWindowContentScaleCallback</a>(window, window_content_scale_callback);</div>
|
464
|
+
<div class="ttc" id="agroup__window_html_gaf2832ebb5aa6c252a2d261de002c92d6"><div class="ttname"><a href="group__window.html#gaf2832ebb5aa6c252a2d261de002c92d6">glfwSetWindowContentScaleCallback</a></div><div class="ttdeci">GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow *window, GLFWwindowcontentscalefun callback)</div><div class="ttdoc">Sets the window content scale callback for the specified window.</div></div>
|
465
|
+
</div><!-- fragment --><p>The callback function receives the new content scale of the window.</p>
|
466
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_content_scale_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">float</span> xscale, <span class="keywordtype">float</span> yscale)</div>
|
467
|
+
<div class="line">{</div>
|
468
|
+
<div class="line"> set_interface_scale(xscale, yscale);</div>
|
469
|
+
<div class="line">}</div>
|
470
|
+
</div><!-- fragment --><p>On platforms where pixels and screen coordinates always map 1:1, the window will need to be resized to appear the same size when it is moved to a monitor with a different content scale. To have this done automatically both when the window is created and when its content scale later changes, set the <a class="el" href="window_guide.html#GLFW_SCALE_TO_MONITOR">GLFW_SCALE_TO_MONITOR</a> window hint.</p>
|
471
|
+
<h2><a class="anchor" id="window_sizelimits"></a>
|
472
|
+
Window size limits</h2>
|
473
|
+
<p>The minimum and maximum size of the content area of a windowed mode window can be enforced with <a class="el" href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">glfwSetWindowSizeLimits</a>. The user may resize the window to any size and aspect ratio within the specified limits, unless the aspect ratio is also set.</p>
|
474
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">glfwSetWindowSizeLimits</a>(window, 200, 200, 400, 400);</div>
|
475
|
+
<div class="ttc" id="agroup__window_html_gac314fa6cec7d2d307be9963e2709cc90"><div class="ttname"><a href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">glfwSetWindowSizeLimits</a></div><div class="ttdeci">void glfwSetWindowSizeLimits(GLFWwindow *window, int minwidth, int minheight, int maxwidth, int maxheight)</div><div class="ttdoc">Sets the size limits of the specified window.</div></div>
|
476
|
+
</div><!-- fragment --><p>To specify only a minimum size or only a maximum one, set the other pair to <code>GLFW_DONT_CARE</code>.</p>
|
477
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gac314fa6cec7d2d307be9963e2709cc90">glfwSetWindowSizeLimits</a>(window, 640, 480, <a class="code hl_define" href="glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571">GLFW_DONT_CARE</a>, <a class="code hl_define" href="glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571">GLFW_DONT_CARE</a>);</div>
|
478
|
+
<div class="ttc" id="aglfw3_8h_html_a7a2edf2c18446833d27d07f1b7f3d571"><div class="ttname"><a href="glfw3_8h.html#a7a2edf2c18446833d27d07f1b7f3d571">GLFW_DONT_CARE</a></div><div class="ttdeci">#define GLFW_DONT_CARE</div><div class="ttdef"><b>Definition</b> glfw3.h:1138</div></div>
|
479
|
+
</div><!-- fragment --><p>To disable size limits for a window, set them all to <code>GLFW_DONT_CARE</code>.</p>
|
480
|
+
<p>The aspect ratio of the content area of a windowed mode window can be enforced with <a class="el" href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">glfwSetWindowAspectRatio</a>. The user may resize the window freely unless size limits are also set, but the size will be constrained to maintain the aspect ratio.</p>
|
481
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">glfwSetWindowAspectRatio</a>(window, 16, 9);</div>
|
482
|
+
<div class="ttc" id="agroup__window_html_ga72ac8cb1ee2e312a878b55153d81b937"><div class="ttname"><a href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">glfwSetWindowAspectRatio</a></div><div class="ttdeci">void glfwSetWindowAspectRatio(GLFWwindow *window, int numer, int denom)</div><div class="ttdoc">Sets the aspect ratio of the specified window.</div></div>
|
483
|
+
</div><!-- fragment --><p>The aspect ratio is specified as a numerator and denominator, corresponding to the width and height, respectively. If you want a window to maintain its current aspect ratio, use its current size as the ratio.</p>
|
484
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> width, height;</div>
|
485
|
+
<div class="line"><a class="code hl_function" href="group__window.html#gaeea7cbc03373a41fb51cfbf9f2a5d4c6">glfwGetWindowSize</a>(window, &width, &height);</div>
|
486
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga72ac8cb1ee2e312a878b55153d81b937">glfwSetWindowAspectRatio</a>(window, width, height);</div>
|
487
|
+
</div><!-- fragment --><p>To disable the aspect ratio limit for a window, set both terms to <code>GLFW_DONT_CARE</code>.</p>
|
488
|
+
<p>You can have both size limits and aspect ratio set for a window, but the results are undefined if they conflict.</p>
|
489
|
+
<h2><a class="anchor" id="window_pos"></a>
|
490
|
+
Window position</h2>
|
491
|
+
<p>The position of a windowed-mode window can be changed with <a class="el" href="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8">glfwSetWindowPos</a>. This moves the window so that the upper-left corner of its content area has the specified <a class="el" href="intro_guide.html#coordinate_systems">screen coordinates</a>. The window system may put limitations on window placement.</p>
|
492
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8">glfwSetWindowPos</a>(window, 100, 100);</div>
|
493
|
+
<div class="ttc" id="agroup__window_html_ga1abb6d690e8c88e0c8cd1751356dbca8"><div class="ttname"><a href="group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8">glfwSetWindowPos</a></div><div class="ttdeci">void glfwSetWindowPos(GLFWwindow *window, int xpos, int ypos)</div><div class="ttdoc">Sets the position of the content area of the specified window.</div></div>
|
494
|
+
</div><!-- fragment --><p>If you wish to be notified when a window is moved, whether by the user, the system or your own code, set a position callback.</p>
|
495
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga08bdfbba88934f9c4f92fd757979ac74">glfwSetWindowPosCallback</a>(window, window_pos_callback);</div>
|
496
|
+
<div class="ttc" id="agroup__window_html_ga08bdfbba88934f9c4f92fd757979ac74"><div class="ttname"><a href="group__window.html#ga08bdfbba88934f9c4f92fd757979ac74">glfwSetWindowPosCallback</a></div><div class="ttdeci">GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow *window, GLFWwindowposfun callback)</div><div class="ttdoc">Sets the position callback for the specified window.</div></div>
|
497
|
+
</div><!-- fragment --><p>The callback function receives the new position, in screen coordinates, of the upper-left corner of the content area when the window is moved.</p>
|
498
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_pos_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> xpos, <span class="keywordtype">int</span> ypos)</div>
|
499
|
+
<div class="line">{</div>
|
500
|
+
<div class="line">}</div>
|
501
|
+
</div><!-- fragment --><p>There is also <a class="el" href="group__window.html#ga73cb526c000876fd8ddf571570fdb634">glfwGetWindowPos</a> for directly retrieving the current position of the content area of the window.</p>
|
502
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> xpos, ypos;</div>
|
503
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga73cb526c000876fd8ddf571570fdb634">glfwGetWindowPos</a>(window, &xpos, &ypos);</div>
|
504
|
+
<div class="ttc" id="agroup__window_html_ga73cb526c000876fd8ddf571570fdb634"><div class="ttname"><a href="group__window.html#ga73cb526c000876fd8ddf571570fdb634">glfwGetWindowPos</a></div><div class="ttdeci">void glfwGetWindowPos(GLFWwindow *window, int *xpos, int *ypos)</div><div class="ttdoc">Retrieves the position of the content area of the specified window.</div></div>
|
505
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_title"></a>
|
506
|
+
Window title</h2>
|
507
|
+
<p>All GLFW windows have a title, although undecorated or full screen windows may not display it or only display it in a task bar or similar interface. You can set a UTF-8 encoded window title with <a class="el" href="group__window.html#ga5d877f09e968cef7a360b513306f17ff">glfwSetWindowTitle</a>.</p>
|
508
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga5d877f09e968cef7a360b513306f17ff">glfwSetWindowTitle</a>(window, <span class="stringliteral">"My Window"</span>);</div>
|
509
|
+
<div class="ttc" id="agroup__window_html_ga5d877f09e968cef7a360b513306f17ff"><div class="ttname"><a href="group__window.html#ga5d877f09e968cef7a360b513306f17ff">glfwSetWindowTitle</a></div><div class="ttdeci">void glfwSetWindowTitle(GLFWwindow *window, const char *title)</div><div class="ttdoc">Sets the title of the specified window.</div></div>
|
510
|
+
</div><!-- fragment --><p>The specified string is copied before the function returns, so there is no need to keep it around.</p>
|
511
|
+
<p>As long as your source file is encoded as UTF-8, you can use any Unicode characters directly in the source.</p>
|
512
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga5d877f09e968cef7a360b513306f17ff">glfwSetWindowTitle</a>(window, <span class="stringliteral">"ラストエグザイル"</span>);</div>
|
513
|
+
</div><!-- fragment --><p>If you are using C++11 or C11, you can use a UTF-8 string literal.</p>
|
514
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga5d877f09e968cef7a360b513306f17ff">glfwSetWindowTitle</a>(window, u8<span class="stringliteral">"This is always a UTF-8 string"</span>);</div>
|
515
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_icon"></a>
|
516
|
+
Window icon</h2>
|
517
|
+
<p>Decorated windows have icons on some platforms. You can set this icon by specifying a list of candidate images with <a class="el" href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a>.</p>
|
518
|
+
<div class="fragment"><div class="line"><a class="code hl_struct" href="struct_g_l_f_wimage.html">GLFWimage</a> images[2];</div>
|
519
|
+
<div class="line">images[0] = load_icon(<span class="stringliteral">"my_icon.png"</span>);</div>
|
520
|
+
<div class="line">images[1] = load_icon(<span class="stringliteral">"my_icon_small.png"</span>);</div>
|
521
|
+
<div class="line"> </div>
|
522
|
+
<div class="line"><a class="code hl_function" href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a>(window, 2, images);</div>
|
523
|
+
<div class="ttc" id="agroup__window_html_gadd7ccd39fe7a7d1f0904666ae5932dc5"><div class="ttname"><a href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a></div><div class="ttdeci">void glfwSetWindowIcon(GLFWwindow *window, int count, const GLFWimage *images)</div><div class="ttdoc">Sets the icon for the specified window.</div></div>
|
524
|
+
<div class="ttc" id="astruct_g_l_f_wimage_html"><div class="ttname"><a href="struct_g_l_f_wimage.html">GLFWimage</a></div><div class="ttdoc">Image data.</div><div class="ttdef"><b>Definition</b> glfw3.h:1731</div></div>
|
525
|
+
</div><!-- fragment --><p>The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. The pixels are arranged canonically as sequential rows, starting from the top-left corner.</p>
|
526
|
+
<p>To revert to the default window icon, pass in an empty image array.</p>
|
527
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5">glfwSetWindowIcon</a>(window, 0, NULL);</div>
|
528
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_monitor"></a>
|
529
|
+
Window monitor</h2>
|
530
|
+
<p>Full screen windows are associated with a specific monitor. You can get the handle for this monitor with <a class="el" href="group__window.html#ga4d766499ac02c60f02221a9dfab87299">glfwGetWindowMonitor</a>.</p>
|
531
|
+
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor = <a class="code hl_function" href="group__window.html#ga4d766499ac02c60f02221a9dfab87299">glfwGetWindowMonitor</a>(window);</div>
|
532
|
+
<div class="ttc" id="agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3"><div class="ttname"><a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></div><div class="ttdeci">struct GLFWmonitor GLFWmonitor</div><div class="ttdoc">Opaque monitor object.</div><div class="ttdef"><b>Definition</b> glfw3.h:1183</div></div>
|
533
|
+
<div class="ttc" id="agroup__window_html_ga4d766499ac02c60f02221a9dfab87299"><div class="ttname"><a href="group__window.html#ga4d766499ac02c60f02221a9dfab87299">glfwGetWindowMonitor</a></div><div class="ttdeci">GLFWmonitor * glfwGetWindowMonitor(GLFWwindow *window)</div><div class="ttdoc">Returns the monitor that the window uses for full screen mode.</div></div>
|
534
|
+
</div><!-- fragment --><p>This monitor handle is one of those returned by <a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a>.</p>
|
535
|
+
<p>For windowed mode windows, this function returns <code>NULL</code>. This is how to tell full screen windows from windowed mode windows.</p>
|
536
|
+
<p>You can move windows between monitors or between full screen and windowed mode with <a class="el" href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>. When making a window full screen on the same or on a different monitor, specify the desired monitor, resolution and refresh rate. The position arguments are ignored.</p>
|
537
|
+
<div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code hl_struct" href="struct_g_l_f_wvidmode.html">GLFWvidmode</a>* mode = <a class="code hl_function" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a>(monitor);</div>
|
538
|
+
<div class="line"> </div>
|
539
|
+
<div class="line"><a class="code hl_function" href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>(window, monitor, 0, 0, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a698dcb200562051a7249cb6ae154c71d">width</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#ac65942a5f6981695517437a9d571d03c">height</a>, mode-><a class="code hl_variable" href="struct_g_l_f_wvidmode.html#a791bdd6c7697b09f7e9c97054bf05649">refreshRate</a>);</div>
|
540
|
+
</div><!-- fragment --><p>When making the window windowed, specify the desired position and size. The refresh rate argument is ignored.</p>
|
541
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga81c76c418af80a1cce7055bccb0ae0a7">glfwSetWindowMonitor</a>(window, NULL, xpos, ypos, width, height, 0);</div>
|
542
|
+
</div><!-- fragment --><p>This restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.. To restore a window that was originally windowed to its original size and position, save these before making it full screen and then pass them in as above.</p>
|
543
|
+
<h2><a class="anchor" id="window_iconify"></a>
|
544
|
+
Window iconification</h2>
|
545
|
+
<p>Windows can be iconified (i.e. minimized) with <a class="el" href="group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4">glfwIconifyWindow</a>.</p>
|
546
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4">glfwIconifyWindow</a>(window);</div>
|
547
|
+
<div class="ttc" id="agroup__window_html_ga1bb559c0ebaad63c5c05ad2a066779c4"><div class="ttname"><a href="group__window.html#ga1bb559c0ebaad63c5c05ad2a066779c4">glfwIconifyWindow</a></div><div class="ttdeci">void glfwIconifyWindow(GLFWwindow *window)</div><div class="ttdoc">Iconifies the specified window.</div></div>
|
548
|
+
</div><!-- fragment --><p>When a full screen window is iconified, the original video mode of its monitor is restored until the user or application restores the window.</p>
|
549
|
+
<p>Iconified windows can be restored with <a class="el" href="group__window.html#ga52527a5904b47d802b6b4bb519cdebc7">glfwRestoreWindow</a>. This function also restores windows from maximization.</p>
|
550
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga52527a5904b47d802b6b4bb519cdebc7">glfwRestoreWindow</a>(window);</div>
|
551
|
+
<div class="ttc" id="agroup__window_html_ga52527a5904b47d802b6b4bb519cdebc7"><div class="ttname"><a href="group__window.html#ga52527a5904b47d802b6b4bb519cdebc7">glfwRestoreWindow</a></div><div class="ttdeci">void glfwRestoreWindow(GLFWwindow *window)</div><div class="ttdoc">Restores the specified window.</div></div>
|
552
|
+
</div><!-- fragment --><p>When a full screen window is restored, the desired video mode is restored to its monitor as well.</p>
|
553
|
+
<p>If you wish to be notified when a window is iconified or restored, whether by the user, system or your own code, set an iconify callback.</p>
|
554
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gac793e9efd255567b5fb8b445052cfd3e">glfwSetWindowIconifyCallback</a>(window, window_iconify_callback);</div>
|
555
|
+
<div class="ttc" id="agroup__window_html_gac793e9efd255567b5fb8b445052cfd3e"><div class="ttname"><a href="group__window.html#gac793e9efd255567b5fb8b445052cfd3e">glfwSetWindowIconifyCallback</a></div><div class="ttdeci">GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow *window, GLFWwindowiconifyfun callback)</div><div class="ttdoc">Sets the iconify callback for the specified window.</div></div>
|
556
|
+
</div><!-- fragment --><p>The callback function receives changes in the iconification state of the window.</p>
|
557
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_iconify_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> iconified)</div>
|
558
|
+
<div class="line">{</div>
|
559
|
+
<div class="line"> <span class="keywordflow">if</span> (iconified)</div>
|
560
|
+
<div class="line"> {</div>
|
561
|
+
<div class="line"> <span class="comment">// The window was iconified</span></div>
|
562
|
+
<div class="line"> }</div>
|
563
|
+
<div class="line"> <span class="keywordflow">else</span></div>
|
564
|
+
<div class="line"> {</div>
|
565
|
+
<div class="line"> <span class="comment">// The window was restored</span></div>
|
566
|
+
<div class="line"> }</div>
|
567
|
+
<div class="line">}</div>
|
568
|
+
</div><!-- fragment --><p>You can also get the current iconification state with <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
|
569
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> iconified = <a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#ga39d44b7c056e55e581355a92d240b58a">GLFW_ICONIFIED</a>);</div>
|
570
|
+
<div class="ttc" id="agroup__window_html_ga39d44b7c056e55e581355a92d240b58a"><div class="ttname"><a href="group__window.html#ga39d44b7c056e55e581355a92d240b58a">GLFW_ICONIFIED</a></div><div class="ttdeci">#define GLFW_ICONIFIED</div><div class="ttdoc">Window iconification window attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:804</div></div>
|
571
|
+
<div class="ttc" id="agroup__window_html_gacccb29947ea4b16860ebef42c2cb9337"><div class="ttname"><a href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a></div><div class="ttdeci">int glfwGetWindowAttrib(GLFWwindow *window, int attrib)</div><div class="ttdoc">Returns an attribute of the specified window.</div></div>
|
572
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_maximize"></a>
|
573
|
+
Window maximization</h2>
|
574
|
+
<p>Windows can be maximized (i.e. zoomed) with <a class="el" href="group__window.html#ga3f541387449d911274324ae7f17ec56b">glfwMaximizeWindow</a>.</p>
|
575
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga3f541387449d911274324ae7f17ec56b">glfwMaximizeWindow</a>(window);</div>
|
576
|
+
<div class="ttc" id="agroup__window_html_ga3f541387449d911274324ae7f17ec56b"><div class="ttname"><a href="group__window.html#ga3f541387449d911274324ae7f17ec56b">glfwMaximizeWindow</a></div><div class="ttdeci">void glfwMaximizeWindow(GLFWwindow *window)</div><div class="ttdoc">Maximizes the specified window.</div></div>
|
577
|
+
</div><!-- fragment --><p>Full screen windows cannot be maximized and passing a full screen window to this function does nothing.</p>
|
578
|
+
<p>Maximized windows can be restored with <a class="el" href="group__window.html#ga52527a5904b47d802b6b4bb519cdebc7">glfwRestoreWindow</a>. This function also restores windows from iconification.</p>
|
579
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga52527a5904b47d802b6b4bb519cdebc7">glfwRestoreWindow</a>(window);</div>
|
580
|
+
</div><!-- fragment --><p>If you wish to be notified when a window is maximized or restored, whether by the user, system or your own code, set a maximize callback.</p>
|
581
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gacbe64c339fbd94885e62145563b6dc93">glfwSetWindowMaximizeCallback</a>(window, window_maximize_callback);</div>
|
582
|
+
<div class="ttc" id="agroup__window_html_gacbe64c339fbd94885e62145563b6dc93"><div class="ttname"><a href="group__window.html#gacbe64c339fbd94885e62145563b6dc93">glfwSetWindowMaximizeCallback</a></div><div class="ttdeci">GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow *window, GLFWwindowmaximizefun callback)</div><div class="ttdoc">Sets the maximize callback for the specified window.</div></div>
|
583
|
+
</div><!-- fragment --><p>The callback function receives changes in the maximization state of the window.</p>
|
584
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_maximize_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> maximized)</div>
|
585
|
+
<div class="line">{</div>
|
586
|
+
<div class="line"> <span class="keywordflow">if</span> (maximized)</div>
|
587
|
+
<div class="line"> {</div>
|
588
|
+
<div class="line"> <span class="comment">// The window was maximized</span></div>
|
589
|
+
<div class="line"> }</div>
|
590
|
+
<div class="line"> <span class="keywordflow">else</span></div>
|
591
|
+
<div class="line"> {</div>
|
592
|
+
<div class="line"> <span class="comment">// The window was restored</span></div>
|
593
|
+
<div class="line"> }</div>
|
594
|
+
<div class="line">}</div>
|
595
|
+
</div><!-- fragment --><p>You can also get the current maximization state with <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
|
596
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> maximized = <a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03">GLFW_MAXIMIZED</a>);</div>
|
597
|
+
<div class="ttc" id="agroup__window_html_gad8ccb396253ad0b72c6d4c917eb38a03"><div class="ttname"><a href="group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03">GLFW_MAXIMIZED</a></div><div class="ttdeci">#define GLFW_MAXIMIZED</div><div class="ttdoc">Window maximization window hint and attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:840</div></div>
|
598
|
+
</div><!-- fragment --><p>By default, newly created windows are not maximized. You can change this behavior by setting the <a class="el" href="window_guide.html#GLFW_MAXIMIZED_hint">GLFW_MAXIMIZED</a> window hint before creating the window.</p>
|
599
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gad8ccb396253ad0b72c6d4c917eb38a03">GLFW_MAXIMIZED</a>, <a class="code hl_define" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>);</div>
|
600
|
+
<div class="ttc" id="agroup__init_html_ga2744fbb29b5631bb28802dbe0cf36eba"><div class="ttname"><a href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a></div><div class="ttdeci">#define GLFW_TRUE</div><div class="ttdoc">One.</div><div class="ttdef"><b>Definition</b> glfw3.h:312</div></div>
|
601
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_hide"></a>
|
602
|
+
Window visibility</h2>
|
603
|
+
<p>Windowed mode windows can be hidden with <a class="el" href="group__window.html#ga49401f82a1ba5f15db5590728314d47c">glfwHideWindow</a>.</p>
|
604
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga49401f82a1ba5f15db5590728314d47c">glfwHideWindow</a>(window);</div>
|
605
|
+
<div class="ttc" id="agroup__window_html_ga49401f82a1ba5f15db5590728314d47c"><div class="ttname"><a href="group__window.html#ga49401f82a1ba5f15db5590728314d47c">glfwHideWindow</a></div><div class="ttdeci">void glfwHideWindow(GLFWwindow *window)</div><div class="ttdoc">Hides the specified window.</div></div>
|
606
|
+
</div><!-- fragment --><p>This makes the window completely invisible to the user, including removing it from the task bar, dock or window list. Full screen windows cannot be hidden and calling <a class="el" href="group__window.html#ga49401f82a1ba5f15db5590728314d47c">glfwHideWindow</a> on a full screen window does nothing.</p>
|
607
|
+
<p>Hidden windows can be shown with <a class="el" href="group__window.html#ga61be47917b72536a148300f46494fc66">glfwShowWindow</a>.</p>
|
608
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga61be47917b72536a148300f46494fc66">glfwShowWindow</a>(window);</div>
|
609
|
+
<div class="ttc" id="agroup__window_html_ga61be47917b72536a148300f46494fc66"><div class="ttname"><a href="group__window.html#ga61be47917b72536a148300f46494fc66">glfwShowWindow</a></div><div class="ttdeci">void glfwShowWindow(GLFWwindow *window)</div><div class="ttdoc">Makes the specified window visible.</div></div>
|
610
|
+
</div><!-- fragment --><p>By default, this function will also set the input focus to that window. Set the <a class="el" href="window_guide.html#GLFW_FOCUS_ON_SHOW_hint">GLFW_FOCUS_ON_SHOW</a> window hint to change this behavior for all newly created windows, or change the behavior for an existing window with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
611
|
+
<p>You can also get the current visibility state with <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
|
612
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> visible = <a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a>);</div>
|
613
|
+
<div class="ttc" id="agroup__window_html_gafb3cdc45297e06d8f1eb13adc69ca6c4"><div class="ttname"><a href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a></div><div class="ttdeci">#define GLFW_VISIBLE</div><div class="ttdoc">Window visibility window hint and attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:816</div></div>
|
614
|
+
</div><!-- fragment --><p>By default, newly created windows are visible. You can change this behavior by setting the <a class="el" href="window_guide.html#GLFW_VISIBLE_hint">GLFW_VISIBLE</a> window hint before creating the window.</p>
|
615
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a>, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
|
616
|
+
</div><!-- fragment --><p>Windows created hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for example moving it to a specific location.</p>
|
617
|
+
<h2><a class="anchor" id="window_focus"></a>
|
618
|
+
Window input focus</h2>
|
619
|
+
<p>Windows can be given input focus and brought to the front with <a class="el" href="group__window.html#ga873780357abd3f3a081d71a40aae45a1">glfwFocusWindow</a>.</p>
|
620
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga873780357abd3f3a081d71a40aae45a1">glfwFocusWindow</a>(window);</div>
|
621
|
+
<div class="ttc" id="agroup__window_html_ga873780357abd3f3a081d71a40aae45a1"><div class="ttname"><a href="group__window.html#ga873780357abd3f3a081d71a40aae45a1">glfwFocusWindow</a></div><div class="ttdeci">void glfwFocusWindow(GLFWwindow *window)</div><div class="ttdoc">Brings the specified window to front and sets input focus.</div></div>
|
622
|
+
</div><!-- fragment --><p>Keep in mind that it can be very disruptive to the user when a window is forced to the top. For a less disruptive way of getting the user's attention, see <a class="el" href="window_guide.html#window_attention">attention requests</a>.</p>
|
623
|
+
<p>If you wish to be notified when a window gains or loses input focus, whether by the user, system or your own code, set a focus callback.</p>
|
624
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gac2d83c4a10f071baf841f6730528e66c">glfwSetWindowFocusCallback</a>(window, window_focus_callback);</div>
|
625
|
+
<div class="ttc" id="agroup__window_html_gac2d83c4a10f071baf841f6730528e66c"><div class="ttname"><a href="group__window.html#gac2d83c4a10f071baf841f6730528e66c">glfwSetWindowFocusCallback</a></div><div class="ttdeci">GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow *window, GLFWwindowfocusfun callback)</div><div class="ttdoc">Sets the focus callback for the specified window.</div></div>
|
626
|
+
</div><!-- fragment --><p>The callback function receives changes in the input focus state of the window.</p>
|
627
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_focus_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> focused)</div>
|
628
|
+
<div class="line">{</div>
|
629
|
+
<div class="line"> <span class="keywordflow">if</span> (focused)</div>
|
630
|
+
<div class="line"> {</div>
|
631
|
+
<div class="line"> <span class="comment">// The window gained input focus</span></div>
|
632
|
+
<div class="line"> }</div>
|
633
|
+
<div class="line"> <span class="keywordflow">else</span></div>
|
634
|
+
<div class="line"> {</div>
|
635
|
+
<div class="line"> <span class="comment">// The window lost input focus</span></div>
|
636
|
+
<div class="line"> }</div>
|
637
|
+
<div class="line">}</div>
|
638
|
+
</div><!-- fragment --><p>You can also get the current input focus state with <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
|
639
|
+
<div class="fragment"><div class="line"><span class="keywordtype">int</span> focused = <a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#ga54ddb14825a1541a56e22afb5f832a9e">GLFW_FOCUSED</a>);</div>
|
640
|
+
<div class="ttc" id="agroup__window_html_ga54ddb14825a1541a56e22afb5f832a9e"><div class="ttname"><a href="group__window.html#ga54ddb14825a1541a56e22afb5f832a9e">GLFW_FOCUSED</a></div><div class="ttdeci">#define GLFW_FOCUSED</div><div class="ttdoc">Input focus window hint and attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:799</div></div>
|
641
|
+
</div><!-- fragment --><p>By default, newly created windows are given input focus. You can change this behavior by setting the <a class="el" href="window_guide.html#GLFW_FOCUSED_hint">GLFW_FOCUSED</a> window hint before creating the window.</p>
|
642
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#ga54ddb14825a1541a56e22afb5f832a9e">GLFW_FOCUSED</a>, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
|
643
|
+
</div><!-- fragment --><h2><a class="anchor" id="window_attention"></a>
|
644
|
+
Window attention request</h2>
|
645
|
+
<p>If you wish to notify the user of an event without interrupting, you can request attention with <a class="el" href="group__window.html#ga2f8d59323fc4692c1d54ba08c863a703">glfwRequestWindowAttention</a>.</p>
|
646
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga2f8d59323fc4692c1d54ba08c863a703">glfwRequestWindowAttention</a>(window);</div>
|
647
|
+
<div class="ttc" id="agroup__window_html_ga2f8d59323fc4692c1d54ba08c863a703"><div class="ttname"><a href="group__window.html#ga2f8d59323fc4692c1d54ba08c863a703">glfwRequestWindowAttention</a></div><div class="ttdeci">void glfwRequestWindowAttention(GLFWwindow *window)</div><div class="ttdoc">Requests user attention to the specified window.</div></div>
|
648
|
+
</div><!-- fragment --><p>The system will highlight the specified window, or on platforms where this is not supported, the application as a whole. Once the user has given it attention, the system will automatically end the request.</p>
|
649
|
+
<h2><a class="anchor" id="window_refresh"></a>
|
650
|
+
Window damage and refresh</h2>
|
651
|
+
<p>If you wish to be notified when the contents of a window is damaged and needs to be refreshed, set a window refresh callback.</p>
|
652
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e">glfwSetWindowRefreshCallback</a>(m_handle, window_refresh_callback);</div>
|
653
|
+
<div class="ttc" id="agroup__window_html_ga1c5c7eb889c33c7f4d10dd35b327654e"><div class="ttname"><a href="group__window.html#ga1c5c7eb889c33c7f4d10dd35b327654e">glfwSetWindowRefreshCallback</a></div><div class="ttdeci">GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow *window, GLFWwindowrefreshfun callback)</div><div class="ttdoc">Sets the refresh callback for the specified window.</div></div>
|
654
|
+
</div><!-- fragment --><p>The callback function is called when the contents of the window needs to be refreshed.</p>
|
655
|
+
<div class="fragment"><div class="line"><span class="keywordtype">void</span> window_refresh_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window)</div>
|
656
|
+
<div class="line">{</div>
|
657
|
+
<div class="line"> draw_editor_ui(window);</div>
|
658
|
+
<div class="line"> <a class="code hl_function" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>(window);</div>
|
659
|
+
<div class="line">}</div>
|
660
|
+
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>On compositing window systems such as Aero, Compiz or Aqua, where the window contents are saved off-screen, this callback might only be called when the window or framebuffer is resized.</dd></dl>
|
661
|
+
<h2><a class="anchor" id="window_transparency"></a>
|
662
|
+
Window transparency</h2>
|
663
|
+
<p>GLFW supports two kinds of transparency for windows; framebuffer transparency and whole window transparency. A single window may not use both methods. The results of doing this are undefined.</p>
|
664
|
+
<p>Both methods require the platform to support it and not every version of every platform GLFW supports does this, so there are mechanisms to check whether the window really is transparent.</p>
|
665
|
+
<p>Window framebuffers can be made transparent on a per-pixel per-frame basis with the <a class="el" href="window_guide.html#GLFW_TRANSPARENT_FRAMEBUFFER_hint">GLFW_TRANSPARENT_FRAMEBUFFER</a> window hint.</p>
|
666
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#ga60a0578c3b9449027d683a9c6abb9f14">GLFW_TRANSPARENT_FRAMEBUFFER</a>, <a class="code hl_define" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>);</div>
|
667
|
+
<div class="ttc" id="agroup__window_html_ga60a0578c3b9449027d683a9c6abb9f14"><div class="ttname"><a href="group__window.html#ga60a0578c3b9449027d683a9c6abb9f14">GLFW_TRANSPARENT_FRAMEBUFFER</a></div><div class="ttdeci">#define GLFW_TRANSPARENT_FRAMEBUFFER</div><div class="ttdoc">Window framebuffer transparency hint and attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:852</div></div>
|
668
|
+
</div><!-- fragment --><p>If supported by the system, the window content area will be composited with the background using the framebuffer per-pixel alpha channel. This requires desktop compositing to be enabled on the system. It does not affect window decorations.</p>
|
669
|
+
<p>You can check whether the window framebuffer was successfully made transparent with the <a class="el" href="window_guide.html#GLFW_TRANSPARENT_FRAMEBUFFER_attrib">GLFW_TRANSPARENT_FRAMEBUFFER</a> window attribute.</p>
|
670
|
+
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#ga60a0578c3b9449027d683a9c6abb9f14">GLFW_TRANSPARENT_FRAMEBUFFER</a>))</div>
|
671
|
+
<div class="line">{</div>
|
672
|
+
<div class="line"> <span class="comment">// window framebuffer is currently transparent</span></div>
|
673
|
+
<div class="line">}</div>
|
674
|
+
</div><!-- fragment --><p>GLFW comes with an example that enabled framebuffer transparency called <code>gears</code>.</p>
|
675
|
+
<p>The opacity of the whole window, including any decorations, can be set with <a class="el" href="group__window.html#gac31caeb3d1088831b13d2c8a156802e9">glfwSetWindowOpacity</a>.</p>
|
676
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gac31caeb3d1088831b13d2c8a156802e9">glfwSetWindowOpacity</a>(window, 0.5f);</div>
|
677
|
+
<div class="ttc" id="agroup__window_html_gac31caeb3d1088831b13d2c8a156802e9"><div class="ttname"><a href="group__window.html#gac31caeb3d1088831b13d2c8a156802e9">glfwSetWindowOpacity</a></div><div class="ttdeci">void glfwSetWindowOpacity(GLFWwindow *window, float opacity)</div><div class="ttdoc">Sets the opacity of the whole window.</div></div>
|
678
|
+
</div><!-- fragment --><p>The opacity (or alpha) value is a positive finite number between zero and one, where 0 (zero) is fully transparent and 1 (one) is fully opaque. The initial opacity value for newly created windows is 1.</p>
|
679
|
+
<p>The current opacity of a window can be queried with <a class="el" href="group__window.html#gad09f0bd7a6307c4533b7061828480a84">glfwGetWindowOpacity</a>.</p>
|
680
|
+
<div class="fragment"><div class="line"><span class="keywordtype">float</span> opacity = <a class="code hl_function" href="group__window.html#gad09f0bd7a6307c4533b7061828480a84">glfwGetWindowOpacity</a>(window);</div>
|
681
|
+
<div class="ttc" id="agroup__window_html_gad09f0bd7a6307c4533b7061828480a84"><div class="ttname"><a href="group__window.html#gad09f0bd7a6307c4533b7061828480a84">glfwGetWindowOpacity</a></div><div class="ttdeci">float glfwGetWindowOpacity(GLFWwindow *window)</div><div class="ttdoc">Returns the opacity of the whole window.</div></div>
|
682
|
+
</div><!-- fragment --><p>If the system does not support whole window transparency, this function always returns one.</p>
|
683
|
+
<p>GLFW comes with a test program that lets you control whole window transparency at run-time called <code>opacity</code>.</p>
|
684
|
+
<h2><a class="anchor" id="window_attribs"></a>
|
685
|
+
Window attributes</h2>
|
686
|
+
<p>Windows have a number of attributes that can be returned using <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>. Some reflect state that may change as a result of user interaction, (e.g. whether it has input focus), while others reflect inherent properties of the window (e.g. what kind of border it has). Some are related to the window and others to its OpenGL or OpenGL ES context.</p>
|
687
|
+
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#ga54ddb14825a1541a56e22afb5f832a9e">GLFW_FOCUSED</a>))</div>
|
688
|
+
<div class="line">{</div>
|
689
|
+
<div class="line"> <span class="comment">// window has input focus</span></div>
|
690
|
+
<div class="line">}</div>
|
691
|
+
</div><!-- fragment --><p>The <a class="el" href="window_guide.html#GLFW_DECORATED_attrib">GLFW_DECORATED</a>, <a class="el" href="window_guide.html#GLFW_RESIZABLE_attrib">GLFW_RESIZABLE</a>, <a class="el" href="window_guide.html#GLFW_FLOATING_attrib">GLFW_FLOATING</a>, <a class="el" href="window_guide.html#GLFW_AUTO_ICONIFY_attrib">GLFW_AUTO_ICONIFY</a> and <a class="el" href="window_guide.html#GLFW_FOCUS_ON_SHOW_attrib">GLFW_FOCUS_ON_SHOW</a> window attributes can be changed with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
692
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d">GLFW_RESIZABLE</a>, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
|
693
|
+
<div class="ttc" id="agroup__window_html_gace2afda29b4116ec012e410a6819033e"><div class="ttname"><a href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a></div><div class="ttdeci">void glfwSetWindowAttrib(GLFWwindow *window, int attrib, int value)</div><div class="ttdoc">Sets an attribute of the specified window.</div></div>
|
694
|
+
<div class="ttc" id="agroup__window_html_gadba13c7a1b3aa40831eb2beedbd5bd1d"><div class="ttname"><a href="group__window.html#gadba13c7a1b3aa40831eb2beedbd5bd1d">GLFW_RESIZABLE</a></div><div class="ttdeci">#define GLFW_RESIZABLE</div><div class="ttdoc">Window resize-ability window hint and attribute.</div><div class="ttdef"><b>Definition</b> glfw3.h:810</div></div>
|
695
|
+
</div><!-- fragment --><h3><a class="anchor" id="window_attribs_wnd"></a>
|
696
|
+
Window related attributes</h3>
|
697
|
+
<p><a class="anchor" id="GLFW_FOCUSED_attrib"></a><b>GLFW_FOCUSED</b> indicates whether the specified window has input focus. See <a class="el" href="window_guide.html#window_focus">Window input focus</a> for details.</p>
|
698
|
+
<p><a class="anchor" id="GLFW_ICONIFIED_attrib"></a><b>GLFW_ICONIFIED</b> indicates whether the specified window is iconified. See <a class="el" href="window_guide.html#window_iconify">Window iconification</a> for details.</p>
|
699
|
+
<p><a class="anchor" id="GLFW_MAXIMIZED_attrib"></a><b>GLFW_MAXIMIZED</b> indicates whether the specified window is maximized. See <a class="el" href="window_guide.html#window_maximize">Window maximization</a> for details.</p>
|
700
|
+
<p><a class="anchor" id="GLFW_HOVERED_attrib"></a><b>GLFW_HOVERED</b> indicates whether the cursor is currently directly over the content area of the window, with no other windows between. See <a class="el" href="input_guide.html#cursor_enter">Cursor enter/leave events</a> for details.</p>
|
701
|
+
<p><a class="anchor" id="GLFW_VISIBLE_attrib"></a><b>GLFW_VISIBLE</b> indicates whether the specified window is visible. See <a class="el" href="window_guide.html#window_hide">Window visibility</a> for details.</p>
|
702
|
+
<p><a class="anchor" id="GLFW_RESIZABLE_attrib"></a><b>GLFW_RESIZABLE</b> indicates whether the specified window is resizable <em>by the user</em>. This can be set before creation with the <a class="el" href="window_guide.html#GLFW_RESIZABLE_hint">GLFW_RESIZABLE</a> window hint or after with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
703
|
+
<p><a class="anchor" id="GLFW_DECORATED_attrib"></a><b>GLFW_DECORATED</b> indicates whether the specified window has decorations such as a border, a close widget, etc. This can be set before creation with the <a class="el" href="window_guide.html#GLFW_DECORATED_hint">GLFW_DECORATED</a> window hint or after with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
704
|
+
<p><a class="anchor" id="GLFW_AUTO_ICONIFY_attrib"></a><b>GLFW_AUTO_ICONIFY</b> indicates whether the specified full screen window is iconified on focus loss, a close widget, etc. This can be set before creation with the <a class="el" href="window_guide.html#GLFW_AUTO_ICONIFY_hint">GLFW_AUTO_ICONIFY</a> window hint or after with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
705
|
+
<p><a class="anchor" id="GLFW_FLOATING_attrib"></a><b>GLFW_FLOATING</b> indicates whether the specified window is floating, also called topmost or always-on-top. This can be set before creation with the <a class="el" href="window_guide.html#GLFW_FLOATING_hint">GLFW_FLOATING</a> window hint or after with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
706
|
+
<p><a class="anchor" id="GLFW_TRANSPARENT_FRAMEBUFFER_attrib"></a><b>GLFW_TRANSPARENT_FRAMEBUFFER</b> indicates whether the specified window has a transparent framebuffer, i.e. the window contents is composited with the background using the window framebuffer alpha channel. See <a class="el" href="window_guide.html#window_transparency">Window transparency</a> for details.</p>
|
707
|
+
<p><a class="anchor" id="GLFW_FOCUS_ON_SHOW_attrib"></a><b>GLFW_FOCUS_ON_SHOW</b> specifies whether the window will be given input focus when <a class="el" href="group__window.html#ga61be47917b72536a148300f46494fc66">glfwShowWindow</a> is called. This can be set before creation with the <a class="el" href="window_guide.html#GLFW_FOCUS_ON_SHOW_hint">GLFW_FOCUS_ON_SHOW</a> window hint or after with <a class="el" href="group__window.html#gace2afda29b4116ec012e410a6819033e">glfwSetWindowAttrib</a>.</p>
|
708
|
+
<h3><a class="anchor" id="window_attribs_ctx"></a>
|
709
|
+
Context related attributes</h3>
|
710
|
+
<p><a class="anchor" id="GLFW_CLIENT_API_attrib"></a><b>GLFW_CLIENT_API</b> indicates the client API provided by the window's context; either <code>GLFW_OPENGL_API</code>, <code>GLFW_OPENGL_ES_API</code> or <code>GLFW_NO_API</code>.</p>
|
711
|
+
<p><a class="anchor" id="GLFW_CONTEXT_CREATION_API_attrib"></a><b>GLFW_CONTEXT_CREATION_API</b> indicates the context creation API used to create the window's context; either <code>GLFW_NATIVE_CONTEXT_API</code>, <code>GLFW_EGL_CONTEXT_API</code> or <code>GLFW_OSMESA_CONTEXT_API</code>.</p>
|
712
|
+
<p><a class="anchor" id="GLFW_CONTEXT_VERSION_MAJOR_attrib"></a><a class="anchor" id="GLFW_CONTEXT_VERSION_MINOR_attrib"></a><a class="anchor" id="GLFW_CONTEXT_REVISION_attrib"></a><b>GLFW_CONTEXT_VERSION_MAJOR</b>, <b>GLFW_CONTEXT_VERSION_MINOR</b> and <b>GLFW_CONTEXT_REVISION</b> indicate the client API version of the window's context.</p>
|
713
|
+
<dl class="section note"><dt>Note</dt><dd>Do not confuse these attributes with <code>GLFW_VERSION_MAJOR</code>, <code>GLFW_VERSION_MINOR</code> and <code>GLFW_VERSION_REVISION</code> which provide the API version of the GLFW header.</dd></dl>
|
714
|
+
<p><a class="anchor" id="GLFW_OPENGL_FORWARD_COMPAT_attrib"></a><b>GLFW_OPENGL_FORWARD_COMPAT</b> is <code>GLFW_TRUE</code> if the window's context is an OpenGL forward-compatible one, or <code>GLFW_FALSE</code> otherwise.</p>
|
715
|
+
<p><a class="anchor" id="GLFW_OPENGL_DEBUG_CONTEXT_attrib"></a><b>GLFW_OPENGL_DEBUG_CONTEXT</b> is <code>GLFW_TRUE</code> if the window's context is in debug mode, or <code>GLFW_FALSE</code> otherwise.</p>
|
716
|
+
<p><a class="anchor" id="GLFW_OPENGL_PROFILE_attrib"></a><b>GLFW_OPENGL_PROFILE</b> indicates the OpenGL profile used by the context. This is <code>GLFW_OPENGL_CORE_PROFILE</code> or <code>GLFW_OPENGL_COMPAT_PROFILE</code> if the context uses a known profile, or <code>GLFW_OPENGL_ANY_PROFILE</code> if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.</p>
|
717
|
+
<p><a class="anchor" id="GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib"></a><b>GLFW_CONTEXT_RELEASE_BEHAVIOR</b> indicates the release used by the context. Possible values are one of <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code> or <code>GLFW_RELEASE_BEHAVIOR_NONE</code>. If the behavior is <code>GLFW_ANY_RELEASE_BEHAVIOR</code>, the default behavior of the context creation API will be used. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_FLUSH</code>, the pipeline will be flushed whenever the context is released from being the current one. If the behavior is <code>GLFW_RELEASE_BEHAVIOR_NONE</code>, the pipeline will not be flushed on release.</p>
|
718
|
+
<p><a class="anchor" id="GLFW_CONTEXT_NO_ERROR_attrib"></a><b>GLFW_CONTEXT_NO_ERROR</b> indicates whether errors are generated by the context. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>. If enabled, situations that would have generated errors instead cause undefined behavior.</p>
|
719
|
+
<p><a class="anchor" id="GLFW_CONTEXT_ROBUSTNESS_attrib"></a><b>GLFW_CONTEXT_ROBUSTNESS</b> indicates the robustness strategy used by the context. This is <code>GLFW_LOSE_CONTEXT_ON_RESET</code> or <code>GLFW_NO_RESET_NOTIFICATION</code> if the window's context supports robustness, or <code>GLFW_NO_ROBUSTNESS</code> otherwise.</p>
|
720
|
+
<h3><a class="anchor" id="window_attribs_fb"></a>
|
721
|
+
Framebuffer related attributes</h3>
|
722
|
+
<p>GLFW does not expose attributes of the default framebuffer (i.e. the framebuffer attached to the window) as these can be queried directly with either OpenGL, OpenGL ES or Vulkan.</p>
|
723
|
+
<p>If you are using version 3.0 or later of OpenGL or OpenGL ES, the <code>glGetFramebufferAttachmentParameteriv</code> function can be used to retrieve the number of bits for the red, green, blue, alpha, depth and stencil buffer channels. Otherwise, the <code>glGetIntegerv</code> function can be used.</p>
|
724
|
+
<p>The number of MSAA samples are always retrieved with <code>glGetIntegerv</code>. For contexts supporting framebuffer objects, the number of samples of the currently bound framebuffer is returned.</p>
|
725
|
+
<table class="markdownTable">
|
726
|
+
<tr class="markdownTableHead">
|
727
|
+
<th class="markdownTableHeadNone">Attribute </th><th class="markdownTableHeadNone">glGetIntegerv </th><th class="markdownTableHeadNone">glGetFramebufferAttachmentParameteriv </th></tr>
|
728
|
+
<tr class="markdownTableRowOdd">
|
729
|
+
<td class="markdownTableBodyNone">Red bits </td><td class="markdownTableBodyNone"><code>GL_RED_BITS</code> </td><td class="markdownTableBodyNone"><code>GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE</code> </td></tr>
|
730
|
+
<tr class="markdownTableRowEven">
|
731
|
+
<td class="markdownTableBodyNone">Green bits </td><td class="markdownTableBodyNone"><code>GL_GREEN_BITS</code> </td><td class="markdownTableBodyNone"><code>GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE</code> </td></tr>
|
732
|
+
<tr class="markdownTableRowOdd">
|
733
|
+
<td class="markdownTableBodyNone">Blue bits </td><td class="markdownTableBodyNone"><code>GL_BLUE_BITS</code> </td><td class="markdownTableBodyNone"><code>GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE</code> </td></tr>
|
734
|
+
<tr class="markdownTableRowEven">
|
735
|
+
<td class="markdownTableBodyNone">Alpha bits </td><td class="markdownTableBodyNone"><code>GL_ALPHA_BITS</code> </td><td class="markdownTableBodyNone"><code>GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE</code> </td></tr>
|
736
|
+
<tr class="markdownTableRowOdd">
|
737
|
+
<td class="markdownTableBodyNone">Depth bits </td><td class="markdownTableBodyNone"><code>GL_DEPTH_BITS</code> </td><td class="markdownTableBodyNone"><code>GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE</code> </td></tr>
|
738
|
+
<tr class="markdownTableRowEven">
|
739
|
+
<td class="markdownTableBodyNone">Stencil bits </td><td class="markdownTableBodyNone"><code>GL_STENCIL_BITS</code> </td><td class="markdownTableBodyNone"><code>GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE</code> </td></tr>
|
740
|
+
<tr class="markdownTableRowOdd">
|
741
|
+
<td class="markdownTableBodyNone">MSAA samples </td><td class="markdownTableBodyNone"><code>GL_SAMPLES</code> </td><td class="markdownTableBodyNone"><em>Not provided by this function</em> </td></tr>
|
742
|
+
</table>
|
743
|
+
<p>When calling <code>glGetFramebufferAttachmentParameteriv</code>, the red, green, blue and alpha sizes are queried from the <code>GL_BACK_LEFT</code>, while the depth and stencil sizes are queried from the <code>GL_DEPTH</code> and <code>GL_STENCIL</code> attachments, respectively.</p>
|
744
|
+
<h1><a class="anchor" id="buffer_swap"></a>
|
745
|
+
Buffer swapping</h1>
|
746
|
+
<p>GLFW windows are by default double buffered. That means that you have two rendering buffers; a front buffer and a back buffer. The front buffer is the one being displayed and the back buffer the one you render to.</p>
|
747
|
+
<p>When the entire frame has been rendered, it is time to swap the back and the front buffers in order to display what has been rendered and begin rendering a new frame. This is done with <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</p>
|
748
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>(window);</div>
|
749
|
+
</div><!-- fragment --><p>Sometimes it can be useful to select when the buffer swap will occur. With the function <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> it is possible to select the minimum number of monitor refreshes the driver should wait from the time <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> was called before swapping the buffers:</p>
|
750
|
+
<div class="fragment"><div class="line"><a class="code hl_function" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a>(1);</div>
|
751
|
+
<div class="ttc" id="agroup__context_html_ga6d4e0cdf151b5e579bd67f13202994ed"><div class="ttname"><a href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a></div><div class="ttdeci">void glfwSwapInterval(int interval)</div><div class="ttdoc">Sets the swap interval for the current context.</div></div>
|
752
|
+
</div><!-- fragment --><p>If the interval is zero, the swap will take place immediately when <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> is called without waiting for a refresh. Otherwise at least interval retraces will pass between each buffer swap. Using a swap interval of zero can be useful for benchmarking purposes, when it is not desirable to measure the time it takes to wait for the vertical retrace. However, a swap interval of one lets you avoid tearing.</p>
|
753
|
+
<p>Note that this may not work on all machines, as some drivers have user-controlled settings that override any swap interval the application requests.</p>
|
754
|
+
<p>A context that supports either the <code>WGL_EXT_swap_control_tear</code> or the <code>GLX_EXT_swap_control_tear</code> extension also accepts <em>negative</em> swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. This trades the risk of visible tears for greater framerate stability. You can check for these extensions with <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>. </p>
|
755
|
+
</div></div><!-- contents -->
|
756
|
+
</div><!-- PageDoc -->
|
757
|
+
<address class="footer">
|
758
|
+
<p>
|
759
|
+
Last update on Thu Dec 14 2023 for GLFW 3.3.9
|
760
|
+
</p>
|
761
|
+
</address>
|
762
|
+
</body>
|
763
|
+
</html>
|