├── .gitignore ├── .DS_Store ├── Screenshots ├── screenshot_0.png ├── screenshot_1.png ├── screenshot_2.png ├── screenshot_3.png ├── screenshot_4.png ├── screenshot_5.png ├── screenshot_6.png ├── screenshot_7.png ├── screenshot_8.png ├── screenshot_9.png ├── screenshot_10.png ├── screenshot_11.png ├── screenshot_12.png ├── screenshot_13.png ├── screenshot_14.png ├── screenshot_15.png ├── screenshot_16.png ├── screenshot_17.png ├── screenshot_18.png ├── screenshot_19.png ├── screenshot_20.png ├── screenshot_21.png ├── screenshot_22.png ├── screenshot_23.png ├── screenshot_24.png ├── screenshot_25.png ├── screenshot_26.png ├── screenshot_27.png ├── screenshot_28.png ├── screenshot_29.png ├── screenshot_30.png ├── screenshot_31.png ├── screenshot_32.png ├── screenshot_33.png ├── screenshot_34.png ├── screenshot_35.png ├── screenshot_36.png ├── screenshot_37.png ├── screenshot_38.png ├── screenshot_39.png └── screenshot_40.png ├── lib └── glfw-3.1.1 │ ├── docs │ ├── html │ │ ├── search │ │ │ ├── all_c.js │ │ │ ├── files_5.js │ │ │ ├── files_7.js │ │ │ ├── all_6.js │ │ │ ├── files_0.js │ │ │ ├── files_6.js │ │ │ ├── files_8.js │ │ │ ├── pages_8.js │ │ │ ├── all_2.js │ │ │ ├── all_7.js │ │ │ ├── groups_1.js │ │ │ ├── groups_3.js │ │ │ ├── pages_2.js │ │ │ ├── all_a.js │ │ │ ├── groups_4.js │ │ │ ├── groups_6.js │ │ │ ├── pages_6.js │ │ │ ├── close.png │ │ │ ├── groups_0.js │ │ │ ├── groups_8.js │ │ │ ├── mag_sel.png │ │ │ ├── pages_7.js │ │ │ ├── search_l.png │ │ │ ├── search_m.png │ │ │ ├── search_r.png │ │ │ ├── groups_7.js │ │ │ ├── all_b.js │ │ │ ├── variables_3.js │ │ │ ├── variables_5.js │ │ │ ├── pages_5.js │ │ │ ├── files_3.js │ │ │ ├── files_2.js │ │ │ ├── pages_0.js │ │ │ ├── pages_1.js │ │ │ ├── pages_3.js │ │ │ ├── pages_4.js │ │ │ ├── all_4.js │ │ │ ├── files_4.js │ │ │ ├── groups_2.js │ │ │ ├── variables_2.js │ │ │ ├── variables_6.js │ │ │ ├── files_1.js │ │ │ ├── classes_0.js │ │ │ ├── variables_0.js │ │ │ ├── variables_1.js │ │ │ ├── groups_5.js │ │ │ ├── all_9.js │ │ │ ├── all_e.js │ │ │ ├── variables_4.js │ │ │ ├── all_d.js │ │ │ ├── all_f.js │ │ │ ├── all_1.js │ │ │ ├── all_0.js │ │ │ ├── all_5.js │ │ │ ├── nomatches.html │ │ │ ├── all_8.js │ │ │ ├── all_0.html │ │ │ ├── all_1.html │ │ │ ├── all_2.html │ │ │ ├── all_3.html │ │ │ ├── all_4.html │ │ │ ├── all_5.html │ │ │ ├── all_6.html │ │ │ ├── all_7.html │ │ │ ├── all_8.html │ │ │ ├── all_9.html │ │ │ ├── all_a.html │ │ │ ├── all_b.html │ │ │ ├── all_c.html │ │ │ ├── all_d.html │ │ │ ├── all_e.html │ │ │ ├── all_f.html │ │ │ ├── files_0.html │ │ │ ├── files_1.html │ │ │ ├── files_2.html │ │ │ ├── files_3.html │ │ │ ├── files_4.html │ │ │ ├── files_5.html │ │ │ ├── files_6.html │ │ │ ├── files_7.html │ │ │ ├── files_8.html │ │ │ ├── pages_0.html │ │ │ ├── pages_1.html │ │ │ ├── pages_2.html │ │ │ ├── pages_3.html │ │ │ ├── pages_4.html │ │ │ ├── pages_5.html │ │ │ ├── pages_6.html │ │ │ ├── pages_7.html │ │ │ ├── pages_8.html │ │ │ ├── classes_0.html │ │ │ ├── defines_0.html │ │ │ ├── groups_0.html │ │ │ ├── groups_1.html │ │ │ ├── groups_2.html │ │ │ ├── groups_3.html │ │ │ ├── groups_4.html │ │ │ ├── groups_5.html │ │ │ ├── groups_6.html │ │ │ ├── groups_7.html │ │ │ ├── groups_8.html │ │ │ ├── functions_0.html │ │ │ ├── typedefs_0.html │ │ │ ├── variables_0.html │ │ │ ├── variables_1.html │ │ │ ├── variables_2.html │ │ │ ├── variables_3.html │ │ │ ├── variables_4.html │ │ │ ├── variables_5.html │ │ │ ├── variables_6.html │ │ │ └── typedefs_0.js │ │ ├── bc_s.png │ │ ├── bdwn.png │ │ ├── open.png │ │ ├── closed.png │ │ ├── doxygen.png │ │ ├── ftv2cl.png │ │ ├── ftv2doc.png │ │ ├── ftv2mo.png │ │ ├── ftv2ns.png │ │ ├── nav_f.png │ │ ├── nav_g.png │ │ ├── nav_h.png │ │ ├── sync_on.png │ │ ├── tab_a.png │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_s.png │ │ ├── ftv2blank.png │ │ ├── ftv2link.png │ │ ├── ftv2mnode.png │ │ ├── ftv2node.png │ │ ├── ftv2pnode.png │ │ ├── sync_off.png │ │ ├── ftv2lastnode.png │ │ ├── ftv2splitbar.png │ │ ├── ftv2vertline.png │ │ ├── ftv2folderopen.png │ │ ├── ftv2mlastnode.png │ │ ├── ftv2plastnode.png │ │ ├── ftv2folderclosed.png │ │ ├── tabs.css │ │ └── dynsections.js │ ├── footer.html │ ├── CMakeLists.txt │ ├── header.html │ └── main.dox │ ├── src │ ├── glfw3.pc.in │ ├── glfw3Config.cmake.in │ ├── xkb_unicode.h │ ├── posix_time.h │ ├── posix_tls.h │ ├── win32_tls.h │ ├── winmm_joystick.h │ ├── iokit_joystick.h │ ├── linux_joystick.h │ ├── nsgl_context.h │ ├── posix_tls.c │ ├── mach_time.c │ ├── win32_tls.c │ ├── win32_time.c │ ├── egl_context.h │ ├── posix_time.c │ ├── mir_platform.h │ ├── mir_init.c │ ├── wgl_context.h │ └── cocoa_platform.h │ ├── CMake │ ├── modules │ │ ├── FindEGL.cmake │ │ ├── FindGLESv1.cmake │ │ ├── FindGLESv2.cmake │ │ ├── FindMir.cmake │ │ ├── FindXKBCommon.cmake │ │ └── FindWayland.cmake │ ├── i586-mingw32msvc.cmake │ ├── amd64-mingw32msvc.cmake │ ├── i686-w64-mingw32.cmake │ ├── i686-pc-mingw32.cmake │ ├── x86_64-w64-mingw32.cmake │ └── AppleInfo.plist │ ├── COPYING.txt │ ├── cmake_uninstall.cmake.in │ ├── deps │ └── getopt.h │ ├── tests │ ├── title.c │ ├── CMakeLists.txt │ └── windows.c │ └── examples │ ├── simple.c │ └── CMakeLists.txt ├── src ├── colorVertexShader.vert ├── io.h ├── Makefile ├── colorFragmentShader.frag ├── imageLoader.h ├── scene.h ├── compile.sh ├── logic.h ├── main.c ├── vector.h ├── types.h ├── particlesComputeShader.comp └── imageLoader.c ├── LICENSE └── CMakeLists.txt /.gitignore: -------------------------------------------------------------------------------- 1 | src/*.o 2 | src/particles 3 | .idea/ 4 | bin/ 5 | CMakeFiles/ 6 | CMakeCache.txt -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/.DS_Store -------------------------------------------------------------------------------- /Screenshots/screenshot_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_0.png -------------------------------------------------------------------------------- /Screenshots/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_1.png -------------------------------------------------------------------------------- /Screenshots/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_2.png -------------------------------------------------------------------------------- /Screenshots/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_3.png -------------------------------------------------------------------------------- /Screenshots/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_4.png -------------------------------------------------------------------------------- /Screenshots/screenshot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_5.png -------------------------------------------------------------------------------- /Screenshots/screenshot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_6.png -------------------------------------------------------------------------------- /Screenshots/screenshot_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_7.png -------------------------------------------------------------------------------- /Screenshots/screenshot_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_8.png -------------------------------------------------------------------------------- /Screenshots/screenshot_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_9.png -------------------------------------------------------------------------------- /Screenshots/screenshot_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_10.png -------------------------------------------------------------------------------- /Screenshots/screenshot_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_11.png -------------------------------------------------------------------------------- /Screenshots/screenshot_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_12.png -------------------------------------------------------------------------------- /Screenshots/screenshot_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_13.png -------------------------------------------------------------------------------- /Screenshots/screenshot_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_14.png -------------------------------------------------------------------------------- /Screenshots/screenshot_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_15.png -------------------------------------------------------------------------------- /Screenshots/screenshot_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_16.png -------------------------------------------------------------------------------- /Screenshots/screenshot_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_17.png -------------------------------------------------------------------------------- /Screenshots/screenshot_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_18.png -------------------------------------------------------------------------------- /Screenshots/screenshot_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_19.png -------------------------------------------------------------------------------- /Screenshots/screenshot_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_20.png -------------------------------------------------------------------------------- /Screenshots/screenshot_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_21.png -------------------------------------------------------------------------------- /Screenshots/screenshot_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_22.png -------------------------------------------------------------------------------- /Screenshots/screenshot_23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_23.png -------------------------------------------------------------------------------- /Screenshots/screenshot_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_24.png -------------------------------------------------------------------------------- /Screenshots/screenshot_25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_25.png -------------------------------------------------------------------------------- /Screenshots/screenshot_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_26.png -------------------------------------------------------------------------------- /Screenshots/screenshot_27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_27.png -------------------------------------------------------------------------------- /Screenshots/screenshot_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_28.png -------------------------------------------------------------------------------- /Screenshots/screenshot_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_29.png -------------------------------------------------------------------------------- /Screenshots/screenshot_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_30.png -------------------------------------------------------------------------------- /Screenshots/screenshot_31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_31.png -------------------------------------------------------------------------------- /Screenshots/screenshot_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_32.png -------------------------------------------------------------------------------- /Screenshots/screenshot_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_33.png -------------------------------------------------------------------------------- /Screenshots/screenshot_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_34.png -------------------------------------------------------------------------------- /Screenshots/screenshot_35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_35.png -------------------------------------------------------------------------------- /Screenshots/screenshot_36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_36.png -------------------------------------------------------------------------------- /Screenshots/screenshot_37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_37.png -------------------------------------------------------------------------------- /Screenshots/screenshot_38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_38.png -------------------------------------------------------------------------------- /Screenshots/screenshot_39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_39.png -------------------------------------------------------------------------------- /Screenshots/screenshot_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/Screenshots/screenshot_40.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['quick_2edox',['quick.dox',['../quick_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['news_2edox',['news.dox',['../news_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['rift_2edox',['rift.dox',['../rift_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/bc_s.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/bdwn.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/open.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['joysticks',['Joysticks',['../group__joysticks.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['build_2edox',['build.dox',['../build_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['quick_2edox',['quick.dox',['../quick_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_2edox',['window.dox',['../window_8dox.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_20guide',['Window guide',['../window.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/closed.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/doxygen.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2cl.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2doc.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2mo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2mo.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2ns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2ns.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/nav_f.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/nav_g.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/nav_h.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['error_20codes',['Error codes',['../group__errors.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['keyboard_20keys',['Keyboard keys',['../group__keys.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['error_20codes',['Error codes',['../group__errors.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['joysticks',['Joysticks',['../group__joysticks.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['getting_20started',['Getting started',['../quick.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/sync_on.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/tab_a.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/tab_b.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/tab_h.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/tab_s.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2blank.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2link.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2mnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2mnode.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2node.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2pnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2pnode.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['oculus_20rift_20guide',['Oculus Rift guide',['../rift.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['keyboard_20keys',['Keyboard keys',['../group__keys.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['native_20access',['Native access',['../group__native.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['oculus_20rift_20guide',['Oculus Rift guide',['../rift.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/sync_off.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2lastnode.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2splitbar.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2vertline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2vertline.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/search/close.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['context_20handling',['Context handling',['../group__context.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_20handling',['Window handling',['../group__window.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2folderopen.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2mlastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2mlastnode.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2plastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2plastnode.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/search/mag_sel.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['standards_20conformance',['Standards conformance',['../compat.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/ftv2folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/ftv2folderclosed.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/search/search_l.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/search/search_m.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MauriceGit/Partikel_accelleration_on_GPU/HEAD/lib/glfw-3.1.1/docs/html/search/search_r.png -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/footer.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['standard_20cursor_20shapes',['Standard cursor shapes',['../group__shapes.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pixels',['pixels',['../structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb',1,'GLFWimage']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pixels',['pixels',['../structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb',1,'GLFWimage']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['size',['size',['../structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5',1,'GLFWgammaramp']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['notitle',['notitle',['../index.html',1,'']]], 4 | ['new_20features',['New features',['../news.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['input_2edox',['input.dox',['../input_8dox.html',1,'']]], 4 | ['intro_2edox',['intro.dox',['../intro_8dox.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['glfw3_2eh',['glfw3.h',['../glfw3_8h.html',1,'']]], 4 | ['glfw3native_2eh',['glfw3native.h',['../glfw3native_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['bug_20list',['Bug List',['../bug.html',1,'']]], 4 | ['building_20applications',['Building applications',['../build.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['compiling_20glfw',['Compiling GLFW',['../compile.html',1,'']]], 4 | ['context_20guide',['Context guide',['../context.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_custom_target(docs ALL ${DOXYGEN_EXECUTABLE} 3 | WORKING_DIRECTORY ${GLFW_BINARY_DIR}/docs 4 | COMMENT "Generating HTML documentation" VERBATIM) 5 | 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['input_20guide',['Input guide',['../input.html',1,'']]], 4 | ['introduction_20to_20the_20api',['Introduction to the API',['../intro.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['monitor_20guide',['Monitor guide',['../monitor.html',1,'']]], 4 | ['moving_20from_20glfw_202_20to_203',['Moving from GLFW 2 to 3',['../moving.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['height',['height',['../structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c',1,'GLFWvidmode::height()'],['../structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec',1,'GLFWimage::height()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['main_2edox',['main.dox',['../main_8dox.html',1,'']]], 4 | ['monitor_2edox',['monitor.dox',['../monitor_8dox.html',1,'']]], 5 | ['moving_2edox',['moving.dox',['../moving_8dox.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialization_2c_20version_20and_20errors',['Initialization, version and errors',['../group__init.html',1,'']]], 4 | ['input_20handling',['Input handling',['../group__input.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['height',['height',['../structGLFWvidmode.html#ac65942a5f6981695517437a9d571d03c',1,'GLFWvidmode::height()'],['../structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec',1,'GLFWimage::height()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['width',['width',['../structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d',1,'GLFWvidmode::width()'],['../structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835',1,'GLFWimage::width()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['compat_2edox',['compat.dox',['../compat_8dox.html',1,'']]], 4 | ['compile_2edox',['compile.dox',['../compile_8dox.html',1,'']]], 5 | ['context_2edox',['context.dox',['../context_8dox.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['glfwgammaramp',['GLFWgammaramp',['../structGLFWgammaramp.html',1,'']]], 4 | ['glfwimage',['GLFWimage',['../structGLFWimage.html',1,'']]], 5 | ['glfwvidmode',['GLFWvidmode',['../structGLFWvidmode.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['blue',['blue',['../structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b',1,'GLFWgammaramp']]], 4 | ['bluebits',['blueBits',['../structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047',1,'GLFWvidmode']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['green',['green',['../structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a',1,'GLFWgammaramp']]], 4 | ['greenbits',['greenBits',['../structGLFWvidmode.html#a292fdd281f3485fb3ff102a5bda43faa',1,'GLFWvidmode']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mouse_20buttons',['Mouse buttons',['../group__buttons.html',1,'']]], 4 | ['modifier_20key_20flags',['Modifier key flags',['../group__mods.html',1,'']]], 5 | ['monitor_20handling',['Monitor handling',['../group__monitor.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['notitle',['notitle',['../index.html',1,'']]], 4 | ['native_20access',['Native access',['../group__native.html',1,'']]], 5 | ['new_20features',['New features',['../news.html',1,'']]], 6 | ['news_2edox',['news.dox',['../news_8dox.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /src/colorVertexShader.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec3 vertPos; 4 | layout (location = 1) in float life; 5 | uniform mat4 viewMatrix, projMatrix; 6 | 7 | out float color; 8 | 9 | void main(){ 10 | color = life; 11 | gl_Position = projMatrix * viewMatrix * vec4(vertPos, 1.0); 12 | } 13 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['standards_20conformance',['Standards conformance',['../compat.html',1,'']]], 4 | ['standard_20cursor_20shapes',['Standard cursor shapes',['../group__shapes.html',1,'']]], 5 | ['size',['size',['../structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5',1,'GLFWgammaramp']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['red',['red',['../structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138',1,'GLFWgammaramp']]], 4 | ['redbits',['redBits',['../structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b',1,'GLFWvidmode']]], 5 | ['refreshrate',['refreshRate',['../structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649',1,'GLFWvidmode']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /src/io.h: -------------------------------------------------------------------------------- 1 | #ifndef __IO_H__ 2 | #define __IO_H__ 3 | #define __DEBUG_GL_H__ 4 | /** 5 | * @file 6 | * CallBack-Funktionsköpfe 7 | * 8 | * @author Maurice Tollmien 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | int initAndStartIO (char *title, int width, int height); 15 | void registerCallBacks (GLFWwindow * window); 16 | void mainLoop (GLFWwindow * window); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['red',['red',['../structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138',1,'GLFWgammaramp']]], 4 | ['redbits',['redBits',['../structGLFWvidmode.html#a6066c4ecd251098700062d3b735dba1b',1,'GLFWvidmode']]], 5 | ['refreshrate',['refreshRate',['../structGLFWvidmode.html#a791bdd6c7697b09f7e9c97054bf05649',1,'GLFWvidmode']]], 6 | ['rift_2edox',['rift.dox',['../rift_8dox.html',1,'']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/glfw3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=${prefix}/include 4 | libdir=${exec_prefix}/lib@LIB_SUFFIX@ 5 | 6 | Name: GLFW 7 | Description: A multi-platform library for OpenGL, window and input 8 | Version: @GLFW_VERSION_FULL@ 9 | URL: http://www.glfw.org/ 10 | Requires.private: @GLFW_PKG_DEPS@ 11 | Libs: -L${libdir} -l@GLFW_LIB_NAME@ 12 | Libs.private: @GLFW_PKG_LIBS@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['width',['width',['../structGLFWvidmode.html#a698dcb200562051a7249cb6ae154c71d',1,'GLFWvidmode::width()'],['../structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835',1,'GLFWimage::width()']]], 4 | ['window_20handling',['Window handling',['../group__window.html',1,'(Global Namespace)'],['../window.html',1,'(Global Namespace)']]], 5 | ['window_2edox',['window.dox',['../window_8dox.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['compat_2edox',['compat.dox',['../compat_8dox.html',1,'']]], 4 | ['compiling_20glfw',['Compiling GLFW',['../compile.html',1,'']]], 5 | ['compile_2edox',['compile.dox',['../compile_8dox.html',1,'']]], 6 | ['context_20handling',['Context handling',['../group__context.html',1,'(Global Namespace)'],['../context.html',1,'(Global Namespace)']]], 7 | ['context_2edox',['context.dox',['../context_8dox.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['blue',['blue',['../structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b',1,'GLFWgammaramp']]], 4 | ['bluebits',['blueBits',['../structGLFWvidmode.html#af310977f58d2e3b188175b6e3d314047',1,'GLFWvidmode']]], 5 | ['bug_20list',['Bug List',['../bug.html',1,'']]], 6 | ['building_20applications',['Building applications',['../build.html',1,'']]], 7 | ['build_2edox',['build.dox',['../build_8dox.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/modules/FindEGL.cmake: -------------------------------------------------------------------------------- 1 | # Find EGL 2 | # 3 | # EGL_INCLUDE_DIR 4 | # EGL_LIBRARY 5 | # EGL_FOUND 6 | 7 | find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h PATHS /opt/vc/include) 8 | 9 | set(EGL_NAMES ${EGL_NAMES} egl EGL) 10 | find_library(EGL_LIBRARY NAMES ${EGL_NAMES} PATHS /opt/vc/lib) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) 14 | 15 | mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY) 16 | 17 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -I. 3 | CFLAGS += $(shell pkg-config glfw3 --cflags) 4 | UNAME_S := $(shell uname -s) 5 | ifeq ($(UNAME_S),Darwin) 6 | LDFLAGS = -L/opt/X11/lib/ 7 | else 8 | LDFLAGS = -L/usr/X11R6/lib64 9 | endif 10 | LIBS = -lz -lGLU -lGL -lGLEW 11 | LIBS += $(shell pkg-config glfw3 --static --libs) 12 | 13 | particles: main.o vector.o imageLoader.o scene.o io.o logic.o 14 | $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) 15 | 16 | %.o: %.c 17 | $(CC) $(CFLAGS) -c -o $@ $< 18 | 19 | clean: 20 | rm -f *.o 21 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialization_2c_20version_20and_20errors',['Initialization, version and errors',['../group__init.html',1,'']]], 4 | ['input_20handling',['Input handling',['../group__input.html',1,'(Global Namespace)'],['../input.html',1,'(Global Namespace)']]], 5 | ['input_2edox',['input.dox',['../input_8dox.html',1,'']]], 6 | ['introduction_20to_20the_20api',['Introduction to the API',['../intro.html',1,'']]], 7 | ['intro_2edox',['intro.dox',['../intro_8dox.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/modules/FindGLESv1.cmake: -------------------------------------------------------------------------------- 1 | # Find GLESv1 2 | # 3 | # GLESv1_INCLUDE_DIR 4 | # GLESv1_LIBRARY 5 | # GLESv1_FOUND 6 | 7 | find_path(GLESv1_INCLUDE_DIR NAMES GLES/gl.h PATHS /opt/vc/include) 8 | 9 | set(GLESv1_NAMES ${GLESv1_NAMES} GLESv1_CM) 10 | find_library(GLESv1_LIBRARY NAMES ${GLESv1_NAMES} PATHS /opt/vc/lib) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | find_package_handle_standard_args(GLESv1 DEFAULT_MSG GLESv1_LIBRARY GLESv1_INCLUDE_DIR) 14 | 15 | mark_as_advanced(GLESv1_INCLUDE_DIR GLESv1_LIBRARY) 16 | 17 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/modules/FindGLESv2.cmake: -------------------------------------------------------------------------------- 1 | # Find GLESv2 2 | # 3 | # GLESv2_INCLUDE_DIR 4 | # GLESv2_LIBRARY 5 | # GLESv2_FOUND 6 | 7 | find_path(GLESv2_INCLUDE_DIR NAMES GLES2/gl2.h PATHS /opt/vc/include) 8 | 9 | set(GLESv2_NAMES ${GLESv2_NAMES} GLESv2) 10 | find_library(GLESv2_LIBRARY NAMES ${GLESv2_NAMES} PATHS /opt/vc/lib) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | find_package_handle_standard_args(GLESv2 DEFAULT_MSG GLESv2_LIBRARY GLESv2_INCLUDE_DIR) 14 | 15 | mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY) 16 | 17 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/modules/FindMir.cmake: -------------------------------------------------------------------------------- 1 | # Try to find Mir on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # MIR_LIBRARIES - Link these to use Wayland 6 | # MIR_INCLUDE_DIR - Include directory for Wayland 7 | # 8 | # Copyright (c) 2014 Brandon Schaefer 9 | 10 | if (NOT WIN32) 11 | 12 | find_package (PkgConfig) 13 | pkg_check_modules (PKG_MIR QUIET mirclient) 14 | 15 | set (MIR_INCLUDE_DIR ${PKG_MIR_INCLUDE_DIRS}) 16 | set (MIR_LIBRARIES ${PKG_MIR_LIBRARIES}) 17 | 18 | endif () 19 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/colorFragmentShader.frag: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | in float color; 4 | out vec4 Out; 5 | 6 | void main(){ 7 | 8 | if (color < 0.1) { 9 | // Fast tote Partikel blenden nach Schwarz über. 10 | Out = mix(vec4(vec3(0.0),1.0), vec4(0.0,0.5,1.0,1.0), color*10.0); 11 | } else if (color > 0.9) { 12 | // Neu geborene Partikel blenden von Schwarz ein. 13 | Out = mix(vec4(0.6,0.05,0.0,1.0), vec4(vec3(0.0),1.0), (color-0.9)*10.0); 14 | } else { 15 | // Lebensdauer Rot --> Blau. 16 | Out = mix(vec4(0.0,0.5,1.0,1.0), vec4(0.6,0.05,0.0,1.0), color); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/imageLoader.h: -------------------------------------------------------------------------------- 1 | #ifndef __IMAGE_H__ 2 | #define __IMAGE_H__ 3 | #define __DEBUG_GL_H__ 4 | /** 5 | * @file 6 | * Programmlogik und Datenhaltung 7 | * 8 | * @author Maurice Tollmien 9 | */ 10 | 11 | /* ---- System Header einbinden ---- */ 12 | #ifdef WIN32 13 | #include 14 | #endif 15 | 16 | #ifdef __APPLE__ 17 | #include 18 | #else 19 | #include 20 | #endif 21 | 22 | #include 23 | #include 24 | 25 | typedef struct { 26 | long unsigned int sizeX, sizeY; 27 | unsigned char * data; 28 | } Image; 29 | 30 | int imageLoad(char *filename, Image *image); 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/glfw3Config.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the glfw3 package 2 | # It defines the following variables 3 | # GLFW3_INCLUDE_DIR, the path where GLFW headers are located 4 | # GLFW3_LIBRARY_DIR, folder in which the GLFW library is located 5 | # GLFW3_LIBRARY, library to link against to use GLFW 6 | 7 | set(GLFW3_VERSION "@GLFW_VERSION_FULL@") 8 | 9 | @PACKAGE_INIT@ 10 | 11 | set_and_check(GLFW3_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/include") 12 | set_and_check(GLFW3_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@") 13 | 14 | find_library(GLFW3_LIBRARY "@GLFW_LIB_NAME@" HINTS ${GLFW3_LIBRARY_DIR}) 15 | 16 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/i586-mingw32msvc.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i586-mingw32msvc-gcc") 5 | SET(CMAKE_CXX_COMPILER "i586-mingw32msvc-g++") 6 | SET(CMAKE_RC_COMPILER "i586-mingw32msvc-windres") 7 | SET(CMAKE_RANLIB "i586-mingw32msvc-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/amd64-mingw32msvc.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win64 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc") 5 | SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++") 6 | SET(CMAKE_RC_COMPILER "amd64-mingw32msvc-windres") 7 | SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mouse_20buttons',['Mouse buttons',['../group__buttons.html',1,'']]], 4 | ['main_2edox',['main.dox',['../main_8dox.html',1,'']]], 5 | ['modifier_20key_20flags',['Modifier key flags',['../group__mods.html',1,'']]], 6 | ['monitor_20handling',['Monitor handling',['../group__monitor.html',1,'(Global Namespace)'],['../monitor.html',1,'(Global Namespace)']]], 7 | ['monitor_2edox',['monitor.dox',['../monitor_8dox.html',1,'']]], 8 | ['moving_20from_20glfw_202_20to_203',['Moving from GLFW 2 to 3',['../moving.html',1,'']]], 9 | ['moving_2edox',['moving.dox',['../moving_8dox.html',1,'']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/i686-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/i686-pc-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "i686-pc-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "i686-pc-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "i686-pc-mingw32-windres") 7 | SET(CMAKE_RANLIB "i686-pc-mingw32-ranlib") 8 | 9 | #Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/opt/mingw/usr/i686-pc-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/x86_64-w64-mingw32.cmake: -------------------------------------------------------------------------------- 1 | # Define the environment for cross compiling from Linux to Win32 2 | SET(CMAKE_SYSTEM_NAME Windows) # Target system name 3 | SET(CMAKE_SYSTEM_VERSION 1) 4 | SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc") 5 | SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++") 6 | SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres") 7 | SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib") 8 | 9 | # Configure the behaviour of the find commands 10 | SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32") 11 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 12 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 13 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 14 | -------------------------------------------------------------------------------- /src/scene.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCENE_H__ 2 | #define __SCENE_H__ 3 | 4 | #define __DEBUG_GL_H__ 5 | /** 6 | * @file 7 | * hier kann gezeichnet werden (Hoffentlich^^) 8 | * 9 | * @author Maurice Tollmien 10 | */ 11 | 12 | /* ---- System Header einbinden ---- */ 13 | #ifdef WIN32 14 | #include 15 | #endif 16 | 17 | #ifdef __APPLE__ 18 | #include 19 | #else 20 | #include 21 | #endif 22 | 23 | #include 24 | #include 25 | #include "types.h" 26 | 27 | void drawVertex(CGPoint3f p1, CGPoint3f p2, CGPoint3f p3, CGPoint3f p4, int color); 28 | void drawScene (void); 29 | void drawWaterSurface(void); 30 | void drawFPS (void); 31 | void drawSides(void); 32 | int initScene (void); 33 | void toggleWireframeMode (void); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, 2016 Maurice Tollmien 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /src/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | programName="particles" 4 | 5 | echo "cleaning up . . ." 6 | echo " --> rm -rf $(ls -C *.o 2> /dev/null)" 7 | rm -rf *.o 2>/dev/null 8 | rm "$programName" 2>/dev/null 9 | 10 | # compile 11 | echo "compiling sources . . ." 12 | echo " --> gcc -I./ -c -o $(ls -C *.c 2>/dev/null)" 13 | gcc -I./ -c -o vector.o vector.c 14 | gcc -I./ -c -o imageLoader.o imageLoader.c 15 | gcc -I./ -c -o main.o main.c 16 | gcc -I./ -c -o scene.o scene.c 17 | gcc -I./ -c -o io.o io.c 18 | gcc -I./ -c -o logic.o logic.c 19 | 20 | 21 | # link 22 | echo "linking source object and image loader object files . . ." 23 | gcc -L/usr/X11R6/lib64 vector.o imageLoader.o main.o scene.o io.o logic.o -lz `pkg-config glfw3 --static --cflags --libs` -o "$programName" -lglut -lGLU -lGL -lGLEW 24 | 25 | rm -rf *.o 2>/dev/null 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(particleSim) 3 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin/") 4 | 5 | add_subdirectory(lib/glfw-3.1.1) 6 | include_directories(lib/glfw-3.1.1/include) 7 | include_directories(lib/glew-1.13.0/include) 8 | 9 | set(GLEW_SRC lib/glew-1.13.0/src/glew.c) 10 | 11 | file(COPY src/colorFragmentShader.frag DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) 12 | file(COPY src/colorVertexShader.vert DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) 13 | file(COPY src/particlesComputeShader.comp DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) 14 | 15 | add_executable(particleSim src/imageLoader.c 16 | src/imageLoader.h 17 | src/io.c 18 | src/io.h 19 | src/logic.c 20 | src/logic.h 21 | src/main.c 22 | src/scene.c 23 | src/scene.h 24 | src/types.h 25 | src/vector.c 26 | src/vector.h 27 | ${GLEW_SRC}) 28 | 29 | target_link_libraries(particleSim glfw ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${GLEW_LIBRARIES} ${GLFW_LIBRARIES}) 30 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/all_f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/files_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/pages_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/defines_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/groups_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/typedefs_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/variables_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/modules/FindXKBCommon.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find XKBCommon 2 | # Once done, this will define 3 | # 4 | # XKBCOMMON_FOUND - System has XKBCommon 5 | # XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories 6 | # XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon 7 | # XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon 8 | 9 | find_package(PkgConfig) 10 | pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon) 11 | set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER}) 12 | 13 | find_path(XKBCOMMON_INCLUDE_DIR 14 | NAMES xkbcommon/xkbcommon.h 15 | HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS} 16 | ) 17 | 18 | find_library(XKBCOMMON_LIBRARY 19 | NAMES xkbcommon 20 | HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS} 21 | ) 22 | 23 | set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY}) 24 | set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS}) 25 | set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR}) 26 | 27 | include(FindPackageHandleStandardArgs) 28 | find_package_handle_standard_args(XKBCommon DEFAULT_MSG 29 | XKBCOMMON_LIBRARY 30 | XKBCOMMON_INCLUDE_DIR 31 | ) 32 | 33 | mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR) 34 | 35 | -------------------------------------------------------------------------------- /src/logic.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOGIC_H__ 2 | #define __LOGIC_H__ 3 | #define __DEBUG_GL_H__ 4 | /** 5 | * @file 6 | * Programmlogik und Datenhaltung 7 | * 8 | * @author Maurice Tollmien 9 | */ 10 | 11 | /* ---- System Header einbinden ---- */ 12 | #ifdef WIN32 13 | #include 14 | #endif 15 | 16 | #ifdef __APPLE__ 17 | #include 18 | #else 19 | #include 20 | #endif 21 | 22 | #include 23 | #include 24 | #include "types.h" 25 | 26 | /* eig. Funktionen */ 27 | 28 | /* ------- GETTER / SETTER ------- */ 29 | void setMouseEvent(MouseInterpretType state,int x, int y); 30 | void setMouseState(MouseInterpretType state); 31 | void setMouseCoord(int x, int y); 32 | MouseInterpretType getMouseEvent(void); 33 | double getCameraPosition (int axis); 34 | void setCameraMovement(int x,int y); 35 | void setCameraZoom(int x,int y); 36 | void setKey (int key, int value); 37 | int getFPS(void); 38 | 39 | /* ------- BERECHNUNGEN ------- */ 40 | void moveCamera(int x, int y); 41 | void zoomCamera(int x, int y); 42 | void calcTimeRelatedStuff (double interval); 43 | void drawRecursiveQuad(CGPoint3f p1, CGPoint3f p2, CGPoint3f p3, CGPoint3f p4, int rek, int color); 44 | /* ------- INIT ------- */ 45 | 46 | void initGame (); 47 | 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") 4 | endif() 5 | 6 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 7 | string(REGEX REPLACE "\n" ";" files "${files}") 8 | 9 | foreach (file ${files}) 10 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 11 | if (EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval) 15 | if (NOT "${rm_retval}" STREQUAL 0) 16 | MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 17 | endif() 18 | elseif (IS_SYMLINK "$ENV{DESTDIR}${file}") 19 | EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 20 | OUTPUT_VARIABLE rm_out 21 | RETURN_VALUE rm_retval) 22 | if (NOT "${rm_retval}" STREQUAL 0) 23 | message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"") 24 | endif() 25 | else() 26 | message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") 27 | endif() 28 | endforeach() 29 | 30 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * ein erster Versuch, eine eigene Datei zu erstellen... 4 | * @author Maurice Tollmien. 5 | */ 6 | 7 | /* ---- System Header einbinden ---- */ 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | /* ---- Eigene Header einbinden ---- */ 17 | #include "io.h" 18 | #include "scene.h" 19 | #include "types.h" 20 | 21 | /** 22 | * Error-Callback-Funktion mit Print des Fehlers. 23 | */ 24 | static void error_callback(int error, const char* description) 25 | { 26 | fputs(description, stderr); 27 | } 28 | 29 | /** 30 | * Hauptprogramm. 31 | * Initialisiert Fenster, Anwendung und Callbacks, startet glutMainLoop. 32 | * @param argc Anzahl der Kommandozeilenparameter (In). 33 | * @param argv Kommandozeilenparameter (In). 34 | * @return Rueckgabewert im Fehlerfall ungleich Null. 35 | */ 36 | int 37 | main (int argc, char **argv) 38 | { 39 | srand (time (0)); 40 | 41 | glfwSetErrorCallback(error_callback); 42 | 43 | 44 | if (!initAndStartIO ("lots and lots of particles ... yeay ... :-)", 1920, 1080)) 45 | { 46 | fprintf (stderr, "Initialisierung fehlgeschlagen!\n"); 47 | glfwTerminate(); 48 | return 1; 49 | } 50 | 51 | glfwTerminate(); 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/AppleInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${APPLE_GUI_EXECUTABLE} 9 | CFBundleGetInfoString 10 | ${APPLE_GUI_INFO_STRING} 11 | CFBundleIconFile 12 | ${APPLE_GUI_ICON} 13 | CFBundleIdentifier 14 | ${APPLE_GUI_IDENTIFIER} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleLongVersionString 18 | ${APPLE_GUI_LONG_VERSION_STRING} 19 | CFBundleName 20 | ${APPLE_GUI_BUNDLE_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | ${APPLE_GUI_SHORT_VERSION_STRING} 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | ${APPLE_GUI_BUNDLE_VERSION} 29 | CSResourcesFileMapped 30 | 31 | LSRequiresCarbon 32 | 33 | NSHumanReadableCopyright 34 | ${APPLE_GUI_COPYRIGHT} 35 | NSHighResolutionCapable 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 7 | } 8 | 9 | .tabs2 { 10 | font-size: 10px; 11 | } 12 | .tabs3 { 13 | font-size: 9px; 14 | } 15 | 16 | .tablist { 17 | margin: 0; 18 | padding: 0; 19 | display: table; 20 | } 21 | 22 | .tablist li { 23 | float: left; 24 | display: table-cell; 25 | background-image: url('tab_b.png'); 26 | line-height: 36px; 27 | list-style: none; 28 | } 29 | 30 | .tablist a { 31 | display: block; 32 | padding: 0 20px; 33 | font-weight: bold; 34 | background-image:url('tab_s.png'); 35 | background-repeat:no-repeat; 36 | background-position:right; 37 | color: #283A5D; 38 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 39 | text-decoration: none; 40 | outline: none; 41 | } 42 | 43 | .tabs3 .tablist a { 44 | padding: 0 10px; 45 | } 46 | 47 | .tablist a:hover { 48 | background-image: url('tab_h.png'); 49 | background-repeat:repeat-x; 50 | color: #fff; 51 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 52 | text-decoration: none; 53 | } 54 | 55 | .tablist li.current a { 56 | background-image: url('tab_a.png'); 57 | background-repeat:repeat-x; 58 | color: #fff; 59 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 60 | } 61 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/xkb_unicode.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _xkb_unicode_h_ 28 | #define _xkb_unicode_h_ 29 | 30 | 31 | long _glfwKeySym2Unicode(unsigned int keysym); 32 | 33 | #endif // _xkb_unicode_h_ 34 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | $projectname: $title 8 | $title 9 | 10 | 11 | 12 | $treeview 13 | $search 14 | $mathjax 15 | 16 | $extrastylesheet 17 | 18 | 19 |
20 | 21 | 22 |
23 |
24 | GLFW 25 | 31 |
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/posix_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #ifndef _posix_time_h_ 29 | #define _posix_time_h_ 30 | 31 | #define _GLFW_PLATFORM_LIBRARY_TIME_STATE _GLFWtimePOSIX posix_time 32 | 33 | #include 34 | 35 | 36 | // POSIX-specific global timer data 37 | // 38 | typedef struct _GLFWtimePOSIX 39 | { 40 | GLboolean monotonic; 41 | double resolution; 42 | uint64_t base; 43 | 44 | } _GLFWtimePOSIX; 45 | 46 | 47 | void _glfwInitTimer(void); 48 | 49 | #endif // _posix_time_h_ 50 | -------------------------------------------------------------------------------- /src/vector.h: -------------------------------------------------------------------------------- 1 | #ifndef __VECTOR_H__ 2 | #define __VECTOR_H__ 3 | #define __DEBUG_GL_H__ 4 | /** 5 | * @file 6 | * Programmlogik und Datenhaltung 7 | * 8 | * @author Maurice Tollmien 9 | */ 10 | 11 | /* ---- System Header einbinden ---- */ 12 | #ifdef WIN32 13 | #include 14 | #endif 15 | 16 | #ifdef __APPLE__ 17 | #include 18 | #else 19 | #include 20 | #endif 21 | 22 | #include 23 | #include 24 | 25 | #include "types.h" 26 | 27 | /* eig. Funktionen */ 28 | 29 | /** 30 | * Konvertierungsfunktion, 31 | * wandelt drei Koordinaten in den dazugehörigen Vektor um 32 | * @param x 33 | * @param y 34 | * @param z 35 | */ 36 | void toVector3D(CGVector3D vector, GLfloat x, GLfloat y, GLfloat z); 37 | /** 38 | * Berechnet die Länge es Vektors 39 | * @param v 40 | *@return float 41 | */ 42 | float vectorLength3D(CGVector3D vector); 43 | 44 | /** 45 | * Normiert eine Vektor 46 | * @param v der zu normierende Vektor 47 | * @return der normierte Vektor 48 | */ 49 | void normVector3D(CGVector3D vector); 50 | 51 | /** 52 | * Berechnet das Kreuzprodukt zweier Vektoren 53 | * @param 54 | * @param 55 | * @return 56 | */ 57 | void crossProduct3D(CGVector3D product, CGVector3D a, CGVector3D b); 58 | 59 | double multiplyVectorVector (CGVector3D a, CGVector3D b); 60 | void multiplyVectorScalar (CGVector3D a, double s, CGVector3D * res); 61 | void subtractVectorVector (CGVector3D a, CGVector3D b, CGVector3D * res); 62 | void divideVectorScalar (CGVector3D a, double s, CGVector3D * res); 63 | void addVectorVector (CGVector3D a, CGVector3D b, CGVector3D * res); 64 | void printVector (CGVector3D a); 65 | double angleVectorVector (CGVector3D a, CGVector3D b); 66 | double radToDeg (double rad); 67 | double degToRad (double deg); 68 | double scalarProduct (CGVector3D a, CGVector3D b); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/posix_tls.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #ifndef _posix_tls_h_ 29 | #define _posix_tls_h_ 30 | 31 | #include 32 | 33 | #define _GLFW_PLATFORM_LIBRARY_TLS_STATE _GLFWtlsPOSIX posix_tls 34 | 35 | 36 | // POSIX-specific global TLS data 37 | // 38 | typedef struct _GLFWtlsPOSIX 39 | { 40 | pthread_key_t context; 41 | 42 | } _GLFWtlsPOSIX; 43 | 44 | 45 | int _glfwInitTLS(void); 46 | void _glfwTerminateTLS(void); 47 | void _glfwSetCurrentContext(_GLFWwindow* context); 48 | 49 | #endif // _posix_tls_h_ 50 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/win32_tls.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #ifndef _win32_tls_h_ 29 | #define _win32_tls_h_ 30 | 31 | #define _GLFW_PLATFORM_LIBRARY_TLS_STATE _GLFWtlsWin32 win32_tls 32 | 33 | 34 | // Win32-specific global TLS data 35 | // 36 | typedef struct _GLFWtlsWin32 37 | { 38 | GLboolean allocated; 39 | DWORD context; 40 | 41 | } _GLFWtlsWin32; 42 | 43 | 44 | int _glfwInitTLS(void); 45 | void _glfwTerminateTLS(void); 46 | void _glfwSetCurrentContext(_GLFWwindow* context); 47 | 48 | #endif // _win32_tls_h_ 49 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/winmm_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 WinMM - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2014 Camilla Berglund 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _winmm_joystick_h_ 28 | #define _winmm_joystick_h_ 29 | 30 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \ 31 | _GLFWjoystickWinMM winmm_js[GLFW_JOYSTICK_LAST + 1] 32 | 33 | 34 | // WinMM-specific per-joystick data 35 | // 36 | typedef struct _GLFWjoystickWinMM 37 | { 38 | float axes[6]; 39 | unsigned char buttons[36]; // 32 buttons plus one hat 40 | char* name; 41 | } _GLFWjoystickWinMM; 42 | 43 | 44 | void _glfwInitJoysticks(void); 45 | void _glfwTerminateJoysticks(void); 46 | 47 | #endif // _winmm_joystick_h_ 48 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/main.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | 3 | @mainpage notitle 4 | 5 | @section main_intro Introduction 6 | 7 | __GLFW__ is a free, Open Source, multi-platform library for creating windows 8 | with OpenGL or OpenGL ES contexts and receiving many kinds of input. It is easy 9 | to integrate into existing applications and does not lay claim to the main loop. 10 | 11 | See @ref news_31 for release highlights or the 12 | [version history](http://www.glfw.org/changelog.html) for details. 13 | 14 | @ref quick is a guide for those new to GLFW. It takes you through how to write 15 | a small but complete program. For people coming from GLFW 2, the @ref moving 16 | guide explains what has changed and how to update existing code to use the new 17 | API. 18 | 19 | There are guides for each of the various areas of the API. 20 | 21 | - @ref intro – initialization, error handling and high-level design 22 | - @ref window – creating and working with windows and framebuffers 23 | - @ref context – working with OpenGL and OpenGL ES contexts 24 | - @ref monitor – enumerating and working with monitors and video modes 25 | - @ref input – receiving events, polling and processing input 26 | 27 | Once you have written a program, see the @ref compile and @ref build guides. 28 | 29 | The [reference documentation](modules.html) provides more detailed information 30 | about specific functions. 31 | 32 | There is a section on @ref guarantees_limitations for pointer lifetimes, 33 | reentrancy, thread safety, event order and backward and forward compatibility. 34 | 35 | The @ref rift fills in the gaps for how to use LibOVR with GLFW. 36 | 37 | The [FAQ](http://www.glfw.org/faq.html) answers many common questions about the 38 | design, implementation and use of GLFW. 39 | 40 | Finally, the @ref compat guide explains what APIs, standards and protocols GLFW 41 | uses and what happens when they are not present on a given machine. 42 | 43 | This documentation was generated with Doxygen. The sources for it are available 44 | in both the [source distribution](http://www.glfw.org/download.html) and 45 | [GitHub repository](https://github.com/glfw/glfw). 46 | 47 | */ 48 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/iokit_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 IOKit - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2014 Camilla Berglund 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _iokit_joystick_h_ 28 | #define _iokit_joystick_h_ 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \ 36 | _GLFWjoystickIOKit iokit_js[GLFW_JOYSTICK_LAST + 1] 37 | 38 | 39 | // IOKit-specific per-joystick data 40 | // 41 | typedef struct _GLFWjoystickIOKit 42 | { 43 | int present; 44 | char name[256]; 45 | 46 | IOHIDDeviceInterface** interface; 47 | 48 | CFMutableArrayRef axisElements; 49 | CFMutableArrayRef buttonElements; 50 | CFMutableArrayRef hatElements; 51 | 52 | float* axes; 53 | unsigned char* buttons; 54 | 55 | } _GLFWjoystickIOKit; 56 | 57 | 58 | void _glfwInitJoysticks(void); 59 | void _glfwTerminateJoysticks(void); 60 | 61 | #endif // _iokit_joystick_h_ 62 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/linux_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _linux_joystick_h_ 28 | #define _linux_joystick_h_ 29 | 30 | #include 31 | 32 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \ 33 | _GLFWjoystickLinux linux_js 34 | 35 | 36 | // Linux-specific joystick API data 37 | // 38 | typedef struct _GLFWjoystickLinux 39 | { 40 | struct 41 | { 42 | int present; 43 | int fd; 44 | float* axes; 45 | int axisCount; 46 | unsigned char* buttons; 47 | int buttonCount; 48 | char* name; 49 | char* path; 50 | } js[GLFW_JOYSTICK_LAST + 1]; 51 | 52 | #if defined(__linux__) 53 | int inotify; 54 | int watch; 55 | regex_t regex; 56 | #endif /*__linux__*/ 57 | } _GLFWjoystickLinux; 58 | 59 | 60 | int _glfwInitJoysticks(void); 61 | void _glfwTerminateJoysticks(void); 62 | 63 | #endif // _linux_joystick_h_ 64 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/nsgl_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 OS X - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2010 Camilla Berglund 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _nsgl_context_h_ 28 | #define _nsgl_context_h_ 29 | 30 | #define _GLFW_PLATFORM_FBCONFIG 31 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL nsgl 32 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryNSGL nsgl 33 | 34 | 35 | // NSGL-specific per-context data 36 | // 37 | typedef struct _GLFWcontextNSGL 38 | { 39 | id pixelFormat; 40 | id context; 41 | 42 | } _GLFWcontextNSGL; 43 | 44 | 45 | // NSGL-specific global data 46 | // 47 | typedef struct _GLFWlibraryNSGL 48 | { 49 | // dlopen handle for OpenGL.framework (for glfwGetProcAddress) 50 | void* framework; 51 | 52 | } _GLFWlibraryNSGL; 53 | 54 | 55 | int _glfwInitContextAPI(void); 56 | void _glfwTerminateContextAPI(void); 57 | int _glfwCreateContext(_GLFWwindow* window, 58 | const _GLFWctxconfig* ctxconfig, 59 | const _GLFWfbconfig* fbconfig); 60 | void _glfwDestroyContext(_GLFWwindow* window); 61 | 62 | #endif // _nsgl_context_h_ 63 | -------------------------------------------------------------------------------- /src/types.h: -------------------------------------------------------------------------------- 1 | #ifndef __TYPES_H__ 2 | #define __TYPES_H__ 3 | 4 | /** 5 | * @file 6 | * Typenschnittstelle. 7 | * Das Modul kapselt die Typdefinitionen und globalen Konstanten des Programms. 8 | * 9 | * @author Maurice Tollmien 10 | */ 11 | #ifdef __APPLE__ 12 | #include 13 | #else 14 | #include 15 | #endif 16 | 17 | /* ---- Eigene Konstanten */ 18 | 19 | /** 20 | * PHYSIK! 21 | */ 22 | #define PARTICLE_COUNT 6000000 23 | #define RAND_COUNT (PARTICLE_COUNT*100) 24 | #define ATTRACTOR_COUNT 8 25 | 26 | 27 | 28 | #define GROUND_HEIGHT 0.3 29 | 30 | #define CAMERA_X -50.1 31 | #define CAMERA_Y 50.0 32 | #define CAMERA_Z 75.0 33 | #define CAMERA_SPEED 15.0 34 | 35 | #define CAMERA_MOVEMENT_SPEED 4.0 36 | #define CAMERA_ZOOM_SPEED 10.0 37 | 38 | #define WORLD_SIZE 150 39 | 40 | #define E 2.71828183 41 | #define PI 3.14159265 42 | #define EPS 0.0001 43 | 44 | /** Anzahl der Aufrufe der Timer-Funktion pro Sekunde */ 45 | #define TIMER_CALLS_PS 1920 46 | 47 | #define RED 0.7, 0.0, 0.0 48 | #define BLUE 0.0, 0.0, 0.7 49 | #define GREEN 0.0, 0.7, 0.0 50 | #define BLACK 0.0, 0.0, 0.0 51 | #define WHITE 1.0, 1.0, 1.0 52 | #define GREY 0.4, 0.4, 0.4 53 | #define YELLOW 0.7, 0.7, 0.0 54 | 55 | /* Tastatur */ 56 | /** Keyboardtaste ESC definieren */ 57 | #define ESC 27 58 | /** Keyboardtaste SPACE definieren */ 59 | #define SPACE 32 60 | 61 | /** Mausereignisse. */ 62 | enum e_MouseInterpretType 63 | { NONE, MOVE, ZOOM}; 64 | /** Datentyp fuer Mausereignisse. */ 65 | typedef enum e_MouseInterpretType MouseInterpretType; 66 | 67 | /** Punkt im 3D-Raum (homogene Koordinaten) */ 68 | typedef GLfloat CGPoint4f[4]; 69 | typedef GLfloat CGPoint3f[3]; 70 | typedef CGPoint3f CGColor; 71 | 72 | /** Datentyp fuer einen Vektor */ 73 | typedef double Vector4D[4]; 74 | typedef Vector4D Punkt4D; 75 | 76 | /** Vektor im 3D-Raum */ 77 | typedef GLfloat CGVector3D[3]; 78 | 79 | typedef int Movement[3]; 80 | 81 | typedef struct { 82 | GLfloat x,y,z,w; 83 | } Vec4; 84 | 85 | typedef struct { 86 | GLfloat x,y,z; 87 | } Vec3; 88 | 89 | typedef Vec4 Attractor[ATTRACTOR_COUNT]; /* xyz = Position, w = Mass */ 90 | 91 | typedef float AttractorMass[ATTRACTOR_COUNT]; 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/deps/getopt.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, Kim Gräsman 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright notice, 7 | * this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright notice, 9 | * this list of conditions and the following disclaimer in the documentation 10 | * and/or other materials provided with the distribution. 11 | * * Neither the name of Kim Gräsman nor the names of contributors may be used 12 | * to endorse or promote products derived from this software without specific 13 | * prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL KIM GRÄSMAN BE LIABLE FOR ANY DIRECT, 19 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef INCLUDED_GETOPT_PORT_H 28 | #define INCLUDED_GETOPT_PORT_H 29 | 30 | #if defined(__cplusplus) 31 | extern "C" { 32 | #endif 33 | 34 | extern const int no_argument; 35 | extern const int required_argument; 36 | extern const int optional_argument; 37 | 38 | extern char* optarg; 39 | extern int optind, opterr, optopt; 40 | 41 | struct option { 42 | const char* name; 43 | int has_arg; 44 | int* flag; 45 | int val; 46 | }; 47 | 48 | int getopt(int argc, char* const argv[], const char* optstring); 49 | 50 | int getopt_long(int argc, char* const argv[], 51 | const char* optstring, const struct option* longopts, int* longindex); 52 | 53 | #if defined(__cplusplus) 54 | } 55 | #endif 56 | 57 | #endif // INCLUDED_GETOPT_PORT_H 58 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/tests/title.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // UTF-8 window title test 3 | // Copyright (c) Camilla Berglund 4 | // 5 | // This software is provided 'as-is', without any express or implied 6 | // warranty. In no event will the authors be held liable for any damages 7 | // arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software 15 | // in a product, an acknowledgment in the product documentation would 16 | // be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not 19 | // be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source 22 | // distribution. 23 | // 24 | //======================================================================== 25 | // 26 | // This test sets a UTF-8 window title 27 | // 28 | //======================================================================== 29 | 30 | #include 31 | 32 | #include 33 | #include 34 | 35 | static void error_callback(int error, const char* description) 36 | { 37 | fprintf(stderr, "Error: %s\n", description); 38 | } 39 | 40 | static void framebuffer_size_callback(GLFWwindow* window, int width, int height) 41 | { 42 | glViewport(0, 0, width, height); 43 | } 44 | 45 | int main(void) 46 | { 47 | GLFWwindow* window; 48 | 49 | glfwSetErrorCallback(error_callback); 50 | 51 | if (!glfwInit()) 52 | exit(EXIT_FAILURE); 53 | 54 | window = glfwCreateWindow(400, 400, "English 日本語 русский язык 官話", NULL, NULL); 55 | if (!window) 56 | { 57 | glfwTerminate(); 58 | exit(EXIT_FAILURE); 59 | } 60 | 61 | glfwMakeContextCurrent(window); 62 | glfwSwapInterval(1); 63 | 64 | glfwSetFramebufferSizeCallback(window, framebuffer_size_callback); 65 | 66 | while (!glfwWindowShouldClose(window)) 67 | { 68 | glClear(GL_COLOR_BUFFER_BIT); 69 | glfwSwapBuffers(window); 70 | glfwWaitEvents(); 71 | } 72 | 73 | glfwTerminate(); 74 | exit(EXIT_SUCCESS); 75 | } 76 | 77 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/posix_tls.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | 31 | ////////////////////////////////////////////////////////////////////////// 32 | ////// GLFW internal API ////// 33 | ////////////////////////////////////////////////////////////////////////// 34 | 35 | int _glfwInitTLS(void) 36 | { 37 | if (pthread_key_create(&_glfw.posix_tls.context, NULL) != 0) 38 | { 39 | _glfwInputError(GLFW_PLATFORM_ERROR, 40 | "POSIX: Failed to create context TLS"); 41 | return GL_FALSE; 42 | } 43 | 44 | return GL_TRUE; 45 | } 46 | 47 | void _glfwTerminateTLS(void) 48 | { 49 | pthread_key_delete(_glfw.posix_tls.context); 50 | } 51 | 52 | void _glfwSetCurrentContext(_GLFWwindow* context) 53 | { 54 | pthread_setspecific(_glfw.posix_tls.context, context); 55 | } 56 | 57 | 58 | ////////////////////////////////////////////////////////////////////////// 59 | ////// GLFW platform API ////// 60 | ////////////////////////////////////////////////////////////////////////// 61 | 62 | _GLFWwindow* _glfwPlatformGetCurrentContext(void) 63 | { 64 | return pthread_getspecific(_glfw.posix_tls.context); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /src/particlesComputeShader.comp: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | // Process particles in blocks of 128 4 | layout (local_size_x = 128, local_size_y = 1, local_size_z = 1) in; 5 | 6 | layout (std430, binding = 0) buffer PositionBuffer { 7 | vec3 positions[]; 8 | }; 9 | layout (std430, binding = 1) buffer VelocityBuffer { 10 | vec4 velocities[]; 11 | }; 12 | layout (binding = 2) buffer AttractorBuffer { 13 | vec4 attractors[]; 14 | }; 15 | layout (std430, binding = 3) buffer LifeBuffer { 16 | float lifes[]; 17 | }; 18 | // Delta time 19 | uniform float dt; 20 | 21 | highp float rand(vec2 co) 22 | { 23 | highp float a = 12.9898; 24 | highp float b = 78.233; 25 | highp float c = 43758.5453; 26 | highp float dt= dot(co.xy ,vec2(a,b)); 27 | highp float sn= mod(dt,3.14); 28 | return fract(sin(sn) * c); 29 | } 30 | 31 | float vecLen (vec3 v) 32 | { 33 | return sqrt(v.x*v.x + v.y*v.y + v.z*v.z); 34 | } 35 | 36 | vec3 normalize (vec3 v) 37 | { 38 | return v / vecLen(v); 39 | } 40 | 41 | vec3 calcForceFor (vec3 forcePoint, vec3 pos) 42 | { 43 | // Force: 44 | float gauss = 10000.0; 45 | float e = 2.71828183; 46 | float k_weak = 1.0; 47 | vec3 dir = forcePoint - pos.xyz; 48 | float g = pow (e, -pow(vecLen(dir), 2) / gauss); 49 | vec3 f = normalize(dir) * k_weak * (1+ mod(rand(dir.xy), 10) - mod(rand(dir.yz), 10)) / 10.0 * g; 50 | return f; 51 | } 52 | 53 | void main(void) 54 | { 55 | uint index = gl_GlobalInvocationID.x; 56 | 57 | int i; 58 | float newDT = dt * 100.0; 59 | 60 | 61 | vec3 forcePoint = vec3(0); 62 | 63 | for (i = 0; i < 32; i++) { 64 | forcePoint += attractors[i].xyz; 65 | } 66 | 67 | // Read the current position and velocity from the buffers 68 | vec4 vel = velocities[index]; 69 | vec3 pos = positions[index]; 70 | float newW = lifes[index]; 71 | 72 | float k_v = 1.5; 73 | 74 | vec3 f = calcForceFor(forcePoint, pos) + rand(pos.xz)/100.0; 75 | 76 | // Velocity: 77 | vec3 v = normalize(vel.xyz + (f * newDT)) * k_v; 78 | 79 | // Eine leichte Anziehung richtung Schwerpunkt... 80 | v += (forcePoint-pos) * 0.00005; 81 | 82 | // Pos: 83 | vec3 s = pos + v * newDT; 84 | 85 | newW -= 0.0001f * newDT; 86 | 87 | // If the particle expires, reset it 88 | if (newW <= 0) { 89 | s = -s + rand(s.xy)*20.0 -rand(s.yz)*20.0; 90 | //v.xyz *= 0.01f; 91 | newW = 0.99f; 92 | } 93 | 94 | lifes[index] = newW; 95 | // Store the new position and velocity back into the buffers 96 | positions[index] = s; 97 | velocities[index] = vec4(v,vel.w); 98 | 99 | } 100 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/mach_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 OS X - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2010 Camilla Berglund 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | #include 30 | 31 | 32 | // Return raw time 33 | // 34 | static uint64_t getRawTime(void) 35 | { 36 | return mach_absolute_time(); 37 | } 38 | 39 | 40 | ////////////////////////////////////////////////////////////////////////// 41 | ////// GLFW internal API ////// 42 | ////////////////////////////////////////////////////////////////////////// 43 | 44 | // Initialise timer 45 | // 46 | void _glfwInitTimer(void) 47 | { 48 | mach_timebase_info_data_t info; 49 | mach_timebase_info(&info); 50 | 51 | _glfw.ns_time.resolution = (double) info.numer / (info.denom * 1.0e9); 52 | _glfw.ns_time.base = getRawTime(); 53 | } 54 | 55 | 56 | ////////////////////////////////////////////////////////////////////////// 57 | ////// GLFW platform API ////// 58 | ////////////////////////////////////////////////////////////////////////// 59 | 60 | double _glfwPlatformGetTime(void) 61 | { 62 | return (double) (getRawTime() - _glfw.ns_time.base) * 63 | _glfw.ns_time.resolution; 64 | } 65 | 66 | void _glfwPlatformSetTime(double time) 67 | { 68 | _glfw.ns_time.base = getRawTime() - 69 | (uint64_t) (time / _glfw.ns_time.resolution); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/win32_tls.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | 31 | ////////////////////////////////////////////////////////////////////////// 32 | ////// GLFW internal API ////// 33 | ////////////////////////////////////////////////////////////////////////// 34 | 35 | int _glfwInitTLS(void) 36 | { 37 | _glfw.win32_tls.context = TlsAlloc(); 38 | if (_glfw.win32_tls.context == TLS_OUT_OF_INDEXES) 39 | { 40 | _glfwInputError(GLFW_PLATFORM_ERROR, 41 | "Win32: Failed to allocate TLS index"); 42 | return GL_FALSE; 43 | } 44 | 45 | _glfw.win32_tls.allocated = GL_TRUE; 46 | return GL_TRUE; 47 | } 48 | 49 | void _glfwTerminateTLS(void) 50 | { 51 | if (_glfw.win32_tls.allocated) 52 | TlsFree(_glfw.win32_tls.context); 53 | } 54 | 55 | void _glfwSetCurrentContext(_GLFWwindow* context) 56 | { 57 | TlsSetValue(_glfw.win32_tls.context, context); 58 | } 59 | 60 | 61 | ////////////////////////////////////////////////////////////////////////// 62 | ////// GLFW platform API ////// 63 | ////////////////////////////////////////////////////////////////////////// 64 | 65 | _GLFWwindow* _glfwPlatformGetCurrentContext(void) 66 | { 67 | return TlsGetValue(_glfw.win32_tls.context); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/search/typedefs_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['glfwcharfun',['GLFWcharfun',['../group__input.html#ga1103f1876518acecb5976f6b307c51d1',1,'glfw3.h']]], 4 | ['glfwcharmodsfun',['GLFWcharmodsfun',['../group__input.html#ga3826e9cf33f760c1480d6ce873f9d002',1,'glfw3.h']]], 5 | ['glfwcursor',['GLFWcursor',['../glfw3_8h.html#a89261ae18c75e863aaf2656ecdd238f4',1,'glfw3.h']]], 6 | ['glfwcursorenterfun',['GLFWcursorenterfun',['../group__input.html#ga762d898d9b0241d7e3e3b767c6cf318f',1,'glfw3.h']]], 7 | ['glfwcursorposfun',['GLFWcursorposfun',['../group__input.html#ga592fbfef76d88f027cb1bc4c36ebd437',1,'glfw3.h']]], 8 | ['glfwdropfun',['GLFWdropfun',['../group__input.html#gacc95e259ad21d4f666faa6280d4018fd',1,'glfw3.h']]], 9 | ['glfwerrorfun',['GLFWerrorfun',['../group__init.html#ga6f2c8574259246a83b1d0c3baf23046f',1,'glfw3.h']]], 10 | ['glfwframebuffersizefun',['GLFWframebuffersizefun',['../group__window.html#ga311bb32e578aa240b6464af494debffc',1,'glfw3.h']]], 11 | ['glfwgammaramp',['GLFWgammaramp',['../group__monitor.html#gaec0bd37af673be8813592849f13e02f0',1,'glfw3.h']]], 12 | ['glfwglproc',['GLFWglproc',['../group__context.html#gabf42b10edde1c4fc71e212e576b9f811',1,'glfw3.h']]], 13 | ['glfwimage',['GLFWimage',['../glfw3_8h.html#ac81c32f4437de7b3aa58ab62c3d9e5b1',1,'glfw3.h']]], 14 | ['glfwkeyfun',['GLFWkeyfun',['../group__input.html#ga592dd1919f8a1dc7576b13cdd8b7b695',1,'glfw3.h']]], 15 | ['glfwmonitor',['GLFWmonitor',['../group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3',1,'glfw3.h']]], 16 | ['glfwmonitorfun',['GLFWmonitorfun',['../group__monitor.html#ga67b74af6cecfdbccc7e57a6319a57210',1,'glfw3.h']]], 17 | ['glfwmousebuttonfun',['GLFWmousebuttonfun',['../group__input.html#ga1e008c7a8751cea648c8f42cc91104cf',1,'glfw3.h']]], 18 | ['glfwscrollfun',['GLFWscrollfun',['../group__input.html#ga6228cdf94d28fbd3a9a1fbb0e5922a8a',1,'glfw3.h']]], 19 | ['glfwvidmode',['GLFWvidmode',['../group__monitor.html#gae48aadf4ea0967e6605c8f58fa5daccb',1,'glfw3.h']]], 20 | ['glfwwindow',['GLFWwindow',['../group__window.html#ga3c96d80d363e67d13a41b5d1821f3242',1,'glfw3.h']]], 21 | ['glfwwindowclosefun',['GLFWwindowclosefun',['../group__window.html#ga07cff8bd3b3d573ecf49bb02d7669c1f',1,'glfw3.h']]], 22 | ['glfwwindowfocusfun',['GLFWwindowfocusfun',['../group__window.html#ga6b5f973531ea91663ad707ba4f2ac104',1,'glfw3.h']]], 23 | ['glfwwindowiconifyfun',['GLFWwindowiconifyfun',['../group__window.html#gae47ae066eea9fe6050a62360928ae524',1,'glfw3.h']]], 24 | ['glfwwindowposfun',['GLFWwindowposfun',['../group__window.html#ga1c36e52549efd47790eb3f324da71924',1,'glfw3.h']]], 25 | ['glfwwindowrefreshfun',['GLFWwindowrefreshfun',['../group__window.html#ga16764f89bf2060e6fa477f0943e1412b',1,'glfw3.h']]], 26 | ['glfwwindowsizefun',['GLFWwindowsizefun',['../group__window.html#gaaca1c2715759d03da9834eac19323d4a',1,'glfw3.h']]] 27 | ]; 28 | -------------------------------------------------------------------------------- /src/imageLoader.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | /* ---- Eigene Header einbinden ---- */ 7 | #include "imageLoader.h" 8 | 9 | int error(FILE * f, char * name, char * errorMessage) { 10 | printf("%s: %s.\n", errorMessage, name); 11 | fclose(f); 12 | return 0; 13 | } 14 | 15 | /* Loads image for texture creation.*/ 16 | int imageLoad(char *filename, Image *image) { 17 | FILE *file; 18 | unsigned long size; /* size of the image in bytes.*/ 19 | unsigned long i; /* standard counter.*/ 20 | unsigned short int planes; /* number of planes in image (must be 1) */ 21 | unsigned short int bpp; /* number of bits per pixel (must be 24)*/ 22 | char temp; /* used to convert bgr to rgb color.*/ 23 | 24 | image->sizeX = 0; 25 | image->sizeY = 0; 26 | 27 | /* make sure the file is there*/ 28 | if ((file = fopen(filename, "rb")) == NULL) 29 | return error(file, "File Not Found", filename); 30 | 31 | /* seek through the bmp header, up to the width/height:*/ 32 | fseek(file, 18, SEEK_CUR); 33 | 34 | /* read the width*/ 35 | if ((i = fread(&image->sizeX, 4, 1, file)) != 1) 36 | return error(file, "Error reading width from", filename); 37 | 38 | printf("Width of %s: %lu\n", filename, image->sizeX); 39 | 40 | /* read the height */ 41 | if ((i = fread(&image->sizeY, 4, 1, file)) != 1) 42 | return error(file, "Error reading height from", filename); 43 | 44 | printf("Height of %s: %lu\n", filename, image->sizeY); 45 | 46 | /* calculate the size (assuming 24 bits or 3 bytes per pixel).*/ 47 | size = image->sizeX * image->sizeY * 3; 48 | 49 | /* read the planes*/ 50 | if ((fread(&planes, 2, 1, file)) != 1) 51 | return error(file, "Error reading planes from", filename); 52 | 53 | if (planes != 1) 54 | return error(file, "Planes from file is not 1", filename); 55 | 56 | /* read the bpp */ 57 | if ((i = fread(&bpp, 2, 1, file)) != 1) 58 | return error(file, "Error reading bpp from", filename); 59 | 60 | if (bpp != 24) 61 | return error(file, "Bpp from file is not 24\n", filename); 62 | 63 | /* seek past the rest of the bitmap header.*/ 64 | fseek(file, 24, SEEK_CUR); 65 | 66 | /* read the data. */ 67 | image->data = malloc(size); 68 | if (image->data == NULL) 69 | return error(file, "Error allocating memory for color-corrected image data", filename); 70 | 71 | if ((i = fread(image->data, size, 1, file)) != 1) 72 | return error(file, "Error reading image data from", filename); 73 | 74 | for (i=0;idata[i]; 77 | image->data[i] = image->data[i+2]; 78 | image->data[i+2] = temp; 79 | } 80 | 81 | fclose(file); 82 | 83 | return 1; 84 | } 85 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/win32_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 Win32 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | 31 | // Return raw time 32 | // 33 | static unsigned __int64 getRawTime(void) 34 | { 35 | if (_glfw.win32_time.hasPC) 36 | { 37 | unsigned __int64 time; 38 | QueryPerformanceCounter((LARGE_INTEGER*) &time); 39 | return time; 40 | } 41 | else 42 | return (unsigned __int64) _glfw_timeGetTime(); 43 | } 44 | 45 | 46 | ////////////////////////////////////////////////////////////////////////// 47 | ////// GLFW internal API ////// 48 | ////////////////////////////////////////////////////////////////////////// 49 | 50 | // Initialise timer 51 | // 52 | void _glfwInitTimer(void) 53 | { 54 | unsigned __int64 frequency; 55 | 56 | if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency)) 57 | { 58 | _glfw.win32_time.hasPC = GL_TRUE; 59 | _glfw.win32_time.resolution = 1.0 / (double) frequency; 60 | } 61 | else 62 | { 63 | _glfw.win32_time.hasPC = GL_FALSE; 64 | _glfw.win32_time.resolution = 0.001; // winmm resolution is 1 ms 65 | } 66 | 67 | _glfw.win32_time.base = getRawTime(); 68 | } 69 | 70 | 71 | ////////////////////////////////////////////////////////////////////////// 72 | ////// GLFW platform API ////// 73 | ////////////////////////////////////////////////////////////////////////// 74 | 75 | double _glfwPlatformGetTime(void) 76 | { 77 | return (double) (getRawTime() - _glfw.win32_time.base) * 78 | _glfw.win32_time.resolution; 79 | } 80 | 81 | void _glfwPlatformSetTime(double time) 82 | { 83 | _glfw.win32_time.base = getRawTime() - 84 | (unsigned __int64) (time / _glfw.win32_time.resolution); 85 | } 86 | 87 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/egl_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 EGL - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #ifndef _egl_context_h_ 29 | #define _egl_context_h_ 30 | 31 | #include 32 | 33 | // This path may need to be changed if you build GLFW using your own setup 34 | // We ship and use our own copy of eglext.h since GLFW uses fairly new 35 | // extensions and not all operating systems come with an up-to-date version 36 | #include "../deps/EGL/eglext.h" 37 | 38 | // Do we have support for dlopen/dlsym? 39 | #if defined(_GLFW_HAS_DLOPEN) 40 | #include 41 | #endif 42 | 43 | #define _GLFW_PLATFORM_FBCONFIG EGLConfig egl 44 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextEGL egl 45 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryEGL egl 46 | 47 | 48 | // EGL-specific per-context data 49 | // 50 | typedef struct _GLFWcontextEGL 51 | { 52 | EGLConfig config; 53 | EGLContext context; 54 | EGLSurface surface; 55 | 56 | #if defined(_GLFW_X11) 57 | XVisualInfo* visual; 58 | #endif 59 | 60 | } _GLFWcontextEGL; 61 | 62 | 63 | // EGL-specific global data 64 | // 65 | typedef struct _GLFWlibraryEGL 66 | { 67 | EGLDisplay display; 68 | EGLint versionMajor, versionMinor; 69 | 70 | GLboolean KHR_create_context; 71 | 72 | } _GLFWlibraryEGL; 73 | 74 | 75 | int _glfwInitContextAPI(void); 76 | void _glfwTerminateContextAPI(void); 77 | int _glfwCreateContext(_GLFWwindow* window, 78 | const _GLFWctxconfig* ctxconfig, 79 | const _GLFWfbconfig* fbconfig); 80 | void _glfwDestroyContext(_GLFWwindow* window); 81 | int _glfwAnalyzeContext(const _GLFWwindow* window, 82 | const _GLFWctxconfig* ctxconfig, 83 | const _GLFWfbconfig* fbconfig); 84 | 85 | #endif // _egl_context_h_ 86 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/posix_time.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #include "internal.h" 29 | 30 | #include 31 | #include 32 | 33 | // Return raw time 34 | // 35 | static uint64_t getRawTime(void) 36 | { 37 | #if defined(CLOCK_MONOTONIC) 38 | if (_glfw.posix_time.monotonic) 39 | { 40 | struct timespec ts; 41 | 42 | clock_gettime(CLOCK_MONOTONIC, &ts); 43 | return (uint64_t) ts.tv_sec * (uint64_t) 1000000000 + (uint64_t) ts.tv_nsec; 44 | } 45 | else 46 | #endif 47 | { 48 | struct timeval tv; 49 | 50 | gettimeofday(&tv, NULL); 51 | return (uint64_t) tv.tv_sec * (uint64_t) 1000000 + (uint64_t) tv.tv_usec; 52 | } 53 | } 54 | 55 | 56 | ////////////////////////////////////////////////////////////////////////// 57 | ////// GLFW internal API ////// 58 | ////////////////////////////////////////////////////////////////////////// 59 | 60 | // Initialise timer 61 | // 62 | void _glfwInitTimer(void) 63 | { 64 | #if defined(CLOCK_MONOTONIC) 65 | struct timespec ts; 66 | 67 | if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) 68 | { 69 | _glfw.posix_time.monotonic = GL_TRUE; 70 | _glfw.posix_time.resolution = 1e-9; 71 | } 72 | else 73 | #endif 74 | { 75 | _glfw.posix_time.resolution = 1e-6; 76 | } 77 | 78 | _glfw.posix_time.base = getRawTime(); 79 | } 80 | 81 | 82 | ////////////////////////////////////////////////////////////////////////// 83 | ////// GLFW platform API ////// 84 | ////////////////////////////////////////////////////////////////////////// 85 | 86 | double _glfwPlatformGetTime(void) 87 | { 88 | return (double) (getRawTime() - _glfw.posix_time.base) * 89 | _glfw.posix_time.resolution; 90 | } 91 | 92 | void _glfwPlatformSetTime(double time) 93 | { 94 | _glfw.posix_time.base = getRawTime() - 95 | (uint64_t) (time / _glfw.posix_time.resolution); 96 | } 97 | 98 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/examples/simple.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // Simple GLFW example 3 | // Copyright (c) Camilla Berglund 4 | // 5 | // This software is provided 'as-is', without any express or implied 6 | // warranty. In no event will the authors be held liable for any damages 7 | // arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software 15 | // in a product, an acknowledgment in the product documentation would 16 | // be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not 19 | // be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source 22 | // distribution. 23 | // 24 | //======================================================================== 25 | //! [code] 26 | 27 | #include 28 | 29 | #include 30 | #include 31 | 32 | static void error_callback(int error, const char* description) 33 | { 34 | fputs(description, stderr); 35 | } 36 | 37 | static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) 38 | { 39 | if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) 40 | glfwSetWindowShouldClose(window, GL_TRUE); 41 | } 42 | 43 | int main(void) 44 | { 45 | GLFWwindow* window; 46 | 47 | glfwSetErrorCallback(error_callback); 48 | 49 | if (!glfwInit()) 50 | exit(EXIT_FAILURE); 51 | 52 | window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL); 53 | if (!window) 54 | { 55 | glfwTerminate(); 56 | exit(EXIT_FAILURE); 57 | } 58 | 59 | glfwMakeContextCurrent(window); 60 | glfwSwapInterval(1); 61 | 62 | glfwSetKeyCallback(window, key_callback); 63 | 64 | while (!glfwWindowShouldClose(window)) 65 | { 66 | float ratio; 67 | int width, height; 68 | 69 | glfwGetFramebufferSize(window, &width, &height); 70 | ratio = width / (float) height; 71 | 72 | glViewport(0, 0, width, height); 73 | glClear(GL_COLOR_BUFFER_BIT); 74 | 75 | glMatrixMode(GL_PROJECTION); 76 | glLoadIdentity(); 77 | glOrtho(-ratio, ratio, -1.f, 1.f, 1.f, -1.f); 78 | glMatrixMode(GL_MODELVIEW); 79 | 80 | glLoadIdentity(); 81 | glRotatef((float) glfwGetTime() * 50.f, 0.f, 0.f, 1.f); 82 | 83 | glBegin(GL_TRIANGLES); 84 | glColor3f(1.f, 0.f, 0.f); 85 | glVertex3f(-0.6f, -0.4f, 0.f); 86 | glColor3f(0.f, 1.f, 0.f); 87 | glVertex3f(0.6f, -0.4f, 0.f); 88 | glColor3f(0.f, 0.f, 1.f); 89 | glVertex3f(0.f, 0.6f, 0.f); 90 | glEnd(); 91 | 92 | glfwSwapBuffers(window); 93 | glfwPollEvents(); 94 | } 95 | 96 | glfwDestroyWindow(window); 97 | 98 | glfwTerminate(); 99 | exit(EXIT_SUCCESS); 100 | } 101 | 102 | //! [code] 103 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/docs/html/dynsections.js: -------------------------------------------------------------------------------- 1 | function toggleVisibility(linkObj) 2 | { 3 | var base = $(linkObj).attr('id'); 4 | var summary = $('#'+base+'-summary'); 5 | var content = $('#'+base+'-content'); 6 | var trigger = $('#'+base+'-trigger'); 7 | var src=$(trigger).attr('src'); 8 | if (content.is(':visible')===true) { 9 | content.hide(); 10 | summary.show(); 11 | $(linkObj).addClass('closed').removeClass('opened'); 12 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 13 | } else { 14 | content.show(); 15 | summary.hide(); 16 | $(linkObj).removeClass('closed').addClass('opened'); 17 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 18 | } 19 | return false; 20 | } 21 | 22 | function updateStripes() 23 | { 24 | $('table.directory tr'). 25 | removeClass('even').filter(':visible:even').addClass('even'); 26 | } 27 | function toggleLevel(level) 28 | { 29 | $('table.directory tr').each(function(){ 30 | var l = this.id.split('_').length-1; 31 | var i = $('#img'+this.id.substring(3)); 32 | var a = $('#arr'+this.id.substring(3)); 33 | if (l 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _mir_platform_h_ 28 | #define _mir_platform_h_ 29 | 30 | #include 31 | 32 | #include "posix_tls.h" 33 | #include "posix_time.h" 34 | #include "linux_joystick.h" 35 | 36 | #include 37 | 38 | #include 39 | 40 | #if defined(_GLFW_EGL) 41 | #include "egl_context.h" 42 | #else 43 | #error "The Mir backend depends on EGL platform support" 44 | #endif 45 | 46 | #define _GLFW_EGL_NATIVE_WINDOW window->mir.window 47 | #define _GLFW_EGL_NATIVE_DISPLAY _glfw.mir.display 48 | 49 | #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowMir mir 50 | #define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorMir mir 51 | #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryMir mir 52 | #define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorMir mir 53 | 54 | // Mir-specific Event Queue 55 | // 56 | typedef struct EventQueue 57 | { 58 | TAILQ_HEAD(, EventNode) head; 59 | } EventQueue; 60 | 61 | // Mir-specific per-window data 62 | // 63 | typedef struct _GLFWwindowMir 64 | { 65 | MirSurface* surface; 66 | int width; 67 | int height; 68 | MirEGLNativeWindowType window; 69 | 70 | } _GLFWwindowMir; 71 | 72 | 73 | // Mir-specific per-monitor data 74 | // 75 | typedef struct _GLFWmonitorMir 76 | { 77 | int cur_mode; 78 | int output_id; 79 | int x; 80 | int y; 81 | 82 | } _GLFWmonitorMir; 83 | 84 | 85 | // Mir-specific global data 86 | // 87 | typedef struct _GLFWlibraryMir 88 | { 89 | MirConnection* connection; 90 | MirEGLNativeDisplayType display; 91 | EventQueue* event_queue; 92 | 93 | pthread_mutex_t event_mutex; 94 | pthread_cond_t event_cond; 95 | 96 | } _GLFWlibraryMir; 97 | 98 | 99 | // Mir-specific per-cursor data 100 | // TODO: Only system cursors are implemented in Mir atm. Need to wait for support. 101 | // 102 | typedef struct _GLFWcursorMir 103 | { 104 | } _GLFWcursorMir; 105 | 106 | 107 | extern void _glfwInitEventQueue(EventQueue* queue); 108 | extern void _glfwDeleteEventQueue(EventQueue* queue); 109 | 110 | #endif // _mir_platform_h_ 111 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/CMake/modules/FindWayland.cmake: -------------------------------------------------------------------------------- 1 | # Try to find Wayland on a Unix system 2 | # 3 | # This will define: 4 | # 5 | # WAYLAND_FOUND - True if Wayland is found 6 | # WAYLAND_LIBRARIES - Link these to use Wayland 7 | # WAYLAND_INCLUDE_DIR - Include directory for Wayland 8 | # WAYLAND_DEFINITIONS - Compiler flags for using Wayland 9 | # 10 | # In addition the following more fine grained variables will be defined: 11 | # 12 | # WAYLAND_CLIENT_FOUND WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES 13 | # WAYLAND_SERVER_FOUND WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES 14 | # WAYLAND_EGL_FOUND WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES 15 | # 16 | # Copyright (c) 2013 Martin Gräßlin 17 | # 18 | # Redistribution and use is allowed according to the terms of the BSD license. 19 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 20 | 21 | IF (NOT WIN32) 22 | IF (WAYLAND_INCLUDE_DIR AND WAYLAND_LIBRARIES) 23 | # In the cache already 24 | SET(WAYLAND_FIND_QUIETLY TRUE) 25 | ENDIF () 26 | 27 | # Use pkg-config to get the directories and then use these values 28 | # in the FIND_PATH() and FIND_LIBRARY() calls 29 | FIND_PACKAGE(PkgConfig) 30 | PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor) 31 | 32 | SET(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS}) 33 | 34 | FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) 35 | FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) 36 | FIND_PATH(WAYLAND_EGL_INCLUDE_DIR NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) 37 | FIND_PATH(WAYLAND_CURSOR_INCLUDE_DIR NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS}) 38 | 39 | FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) 40 | FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) 41 | FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) 42 | FIND_LIBRARY(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS}) 43 | 44 | set(WAYLAND_INCLUDE_DIR ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_SERVER_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_CURSOR_INCLUDE_DIR}) 45 | 46 | set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES}) 47 | 48 | list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIR) 49 | 50 | include(FindPackageHandleStandardArgs) 51 | 52 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR) 53 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR) 54 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR) 55 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR) 56 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR) 57 | 58 | MARK_AS_ADVANCED( 59 | WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES 60 | WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES 61 | WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES 62 | WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES 63 | WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES 64 | ) 65 | 66 | ENDIF () 67 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/mir_init.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 Mir - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Brandon Schaefer 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #include "internal.h" 28 | 29 | #include 30 | #include 31 | 32 | 33 | ////////////////////////////////////////////////////////////////////////// 34 | ////// GLFW internal API ////// 35 | ////////////////////////////////////////////////////////////////////////// 36 | 37 | int _glfwPlatformInit(void) 38 | { 39 | int error; 40 | 41 | _glfw.mir.connection = mir_connect_sync(NULL, __PRETTY_FUNCTION__); 42 | 43 | if (!mir_connection_is_valid(_glfw.mir.connection)) 44 | { 45 | _glfwInputError(GLFW_PLATFORM_ERROR, 46 | "Mir: Unable to connect to server: %s", 47 | mir_connection_get_error_message(_glfw.mir.connection)); 48 | 49 | return GL_FALSE; 50 | } 51 | 52 | _glfw.mir.display = 53 | mir_connection_get_egl_native_display(_glfw.mir.connection); 54 | 55 | if (!_glfwInitContextAPI()) 56 | return GL_FALSE; 57 | 58 | _glfwInitTimer(); 59 | _glfwInitJoysticks(); 60 | 61 | _glfw.mir.event_queue = calloc(1, sizeof(EventQueue)); 62 | _glfwInitEventQueue(_glfw.mir.event_queue); 63 | 64 | error = pthread_mutex_init(&_glfw.mir.event_mutex, NULL); 65 | if (error) 66 | { 67 | _glfwInputError(GLFW_PLATFORM_ERROR, 68 | "Mir: Failed to create event mutex: %s", 69 | strerror(error)); 70 | return GL_FALSE; 71 | } 72 | 73 | return GL_TRUE; 74 | } 75 | 76 | void _glfwPlatformTerminate(void) 77 | { 78 | _glfwTerminateContextAPI(); 79 | _glfwTerminateJoysticks(); 80 | 81 | _glfwDeleteEventQueue(_glfw.mir.event_queue); 82 | 83 | pthread_mutex_destroy(&_glfw.mir.event_mutex); 84 | 85 | mir_connection_release(_glfw.mir.connection); 86 | } 87 | 88 | const char* _glfwPlatformGetVersionString(void) 89 | { 90 | const char* version = _GLFW_VERSION_NUMBER " Mir EGL" 91 | #if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) 92 | " clock_gettime" 93 | #endif 94 | #if defined(_GLFW_BUILD_DLL) 95 | " shared" 96 | #endif 97 | ; 98 | 99 | return version; 100 | } 101 | 102 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | link_libraries(glfw) 3 | 4 | if (BUILD_SHARED_LIBS) 5 | add_definitions(-DGLFW_DLL) 6 | link_libraries("${OPENGL_gl_LIBRARY}" "${MATH_LIBRARY}") 7 | else() 8 | link_libraries(${glfw_LIBRARIES}) 9 | endif() 10 | 11 | include_directories("${GLFW_SOURCE_DIR}/include" 12 | "${GLFW_SOURCE_DIR}/deps") 13 | 14 | if ("${OPENGL_INCLUDE_DIR}") 15 | include_directories("${OPENGL_INCLUDE_DIR}") 16 | endif() 17 | 18 | set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h" 19 | "${GLFW_SOURCE_DIR}/deps/getopt.c") 20 | set(TINYCTHREAD "${GLFW_SOURCE_DIR}/deps/tinycthread.h" 21 | "${GLFW_SOURCE_DIR}/deps/tinycthread.c") 22 | 23 | add_executable(clipboard clipboard.c ${GETOPT}) 24 | add_executable(defaults defaults.c) 25 | add_executable(events events.c ${GETOPT}) 26 | add_executable(fsaa fsaa.c ${GETOPT}) 27 | add_executable(gamma gamma.c ${GETOPT}) 28 | add_executable(glfwinfo glfwinfo.c ${GETOPT}) 29 | add_executable(iconify iconify.c ${GETOPT}) 30 | add_executable(joysticks joysticks.c) 31 | add_executable(monitors monitors.c ${GETOPT}) 32 | add_executable(peter peter.c) 33 | add_executable(reopen reopen.c) 34 | add_executable(cursor cursor.c) 35 | 36 | add_executable(cursoranim WIN32 MACOSX_BUNDLE cursoranim.c) 37 | set_target_properties(cursoranim PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Cursor animation") 38 | 39 | add_executable(accuracy WIN32 MACOSX_BUNDLE accuracy.c) 40 | set_target_properties(accuracy PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Accuracy") 41 | 42 | add_executable(empty WIN32 MACOSX_BUNDLE empty.c ${TINYCTHREAD}) 43 | set_target_properties(empty PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Empty Event") 44 | 45 | add_executable(sharing WIN32 MACOSX_BUNDLE sharing.c) 46 | set_target_properties(sharing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Sharing") 47 | 48 | add_executable(tearing WIN32 MACOSX_BUNDLE tearing.c) 49 | set_target_properties(tearing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Tearing") 50 | 51 | add_executable(threads WIN32 MACOSX_BUNDLE threads.c ${TINYCTHREAD}) 52 | set_target_properties(threads PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Threads") 53 | 54 | add_executable(title WIN32 MACOSX_BUNDLE title.c) 55 | set_target_properties(title PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Title") 56 | 57 | add_executable(windows WIN32 MACOSX_BUNDLE windows.c) 58 | set_target_properties(windows PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Windows") 59 | 60 | target_link_libraries(empty "${CMAKE_THREAD_LIBS_INIT}" "${RT_LIBRARY}") 61 | target_link_libraries(threads "${CMAKE_THREAD_LIBS_INIT}" "${RT_LIBRARY}") 62 | 63 | set(WINDOWS_BINARIES accuracy empty sharing tearing threads title windows cursoranim) 64 | set(CONSOLE_BINARIES clipboard defaults events fsaa gamma glfwinfo 65 | iconify joysticks monitors peter reopen cursor) 66 | 67 | set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES 68 | FOLDER "GLFW3/Tests") 69 | 70 | if (MSVC) 71 | # Tell MSVC to use main instead of WinMain for Windows subsystem executables 72 | set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES 73 | LINK_FLAGS "/ENTRY:mainCRTStartup") 74 | endif() 75 | 76 | if (APPLE) 77 | set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES} PROPERTIES 78 | MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION} 79 | MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION_FULL} 80 | MACOSX_BUNDLE_INFO_PLIST "${GLFW_SOURCE_DIR}/CMake/AppleInfo.plist") 81 | endif() 82 | 83 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | link_libraries(glfw "${OPENGL_glu_LIBRARY}") 3 | 4 | if (BUILD_SHARED_LIBS) 5 | add_definitions(-DGLFW_DLL) 6 | link_libraries("${OPENGL_gl_LIBRARY}" "${MATH_LIBRARY}") 7 | else() 8 | link_libraries(${glfw_LIBRARIES}) 9 | endif() 10 | 11 | include_directories("${GLFW_SOURCE_DIR}/include" 12 | "${GLFW_SOURCE_DIR}/deps") 13 | 14 | if ("${OPENGL_INCLUDE_DIR}") 15 | include_directories("${OPENGL_INCLUDE_DIR}") 16 | endif() 17 | 18 | set(GLAD "${GLFW_SOURCE_DIR}/deps/glad/glad.h" 19 | "${GLFW_SOURCE_DIR}/deps/glad.c") 20 | set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h" 21 | "${GLFW_SOURCE_DIR}/deps/getopt.c") 22 | set(TINYCTHREAD "${GLFW_SOURCE_DIR}/deps/tinycthread.h" 23 | "${GLFW_SOURCE_DIR}/deps/tinycthread.c") 24 | 25 | if (APPLE) 26 | # Set fancy names for bundles 27 | add_executable(Boing MACOSX_BUNDLE boing.c) 28 | add_executable(Gears MACOSX_BUNDLE gears.c) 29 | add_executable(Heightmap MACOSX_BUNDLE heightmap.c ${GLAD}) 30 | add_executable(Particles MACOSX_BUNDLE particles.c ${TINYCTHREAD}) 31 | add_executable(Simple MACOSX_BUNDLE simple.c) 32 | add_executable(SplitView MACOSX_BUNDLE splitview.c) 33 | add_executable(Wave MACOSX_BUNDLE wave.c) 34 | 35 | set_target_properties(Boing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Boing") 36 | set_target_properties(Gears PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Gears") 37 | set_target_properties(Heightmap PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Heightmap") 38 | set_target_properties(Particles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Particles") 39 | set_target_properties(Simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simple") 40 | set_target_properties(SplitView PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Split View") 41 | set_target_properties(Wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave") 42 | 43 | set_target_properties(Boing Gears Heightmap Particles Simple SplitView Wave PROPERTIES 44 | FOLDER "GLFW3/Examples" 45 | MACOSX_BUNDLE_INFO_PLIST "${GLFW_SOURCE_DIR}/CMake/AppleInfo.plist") 46 | 47 | else() 48 | # Set boring names for executables 49 | add_executable(boing WIN32 boing.c) 50 | add_executable(gears WIN32 gears.c) 51 | add_executable(heightmap WIN32 heightmap.c ${GLAD}) 52 | add_executable(particles WIN32 particles.c ${TINYCTHREAD} ${GETOPT}) 53 | add_executable(simple WIN32 simple.c) 54 | add_executable(splitview WIN32 splitview.c) 55 | add_executable(wave WIN32 wave.c) 56 | 57 | set_target_properties(boing gears heightmap particles simple splitview wave PROPERTIES 58 | FOLDER "GLFW3/Examples") 59 | endif() 60 | 61 | if (APPLE) 62 | target_link_libraries(Particles "${CMAKE_THREAD_LIBS_INIT}") 63 | elseif (UNIX) 64 | target_link_libraries(particles "${CMAKE_THREAD_LIBS_INIT}" "${RT_LIBRARY}") 65 | endif() 66 | 67 | if (MSVC) 68 | set(WINDOWS_BINARIES boing gears heightmap particles simple splitview wave) 69 | 70 | # Tell MSVC to use main instead of WinMain for Windows subsystem executables 71 | set_target_properties(${WINDOWS_BINARIES} PROPERTIES 72 | LINK_FLAGS "/ENTRY:mainCRTStartup") 73 | endif() 74 | 75 | if (APPLE) 76 | set(BUNDLE_BINARIES Boing Gears Heightmap Particles Simple SplitView Wave) 77 | 78 | set_target_properties(${BUNDLE_BINARIES} PROPERTIES 79 | MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION} 80 | MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION_FULL}) 81 | endif() 82 | 83 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/tests/windows.c: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // Simple multi-window test 3 | // Copyright (c) Camilla Berglund 4 | // 5 | // This software is provided 'as-is', without any express or implied 6 | // warranty. In no event will the authors be held liable for any damages 7 | // arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it 11 | // freely, subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; you must not 14 | // claim that you wrote the original software. If you use this software 15 | // in a product, an acknowledgment in the product documentation would 16 | // be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, and must not 19 | // be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source 22 | // distribution. 23 | // 24 | //======================================================================== 25 | // 26 | // This test creates four windows and clears each in a different color 27 | // 28 | //======================================================================== 29 | 30 | #include 31 | 32 | #include 33 | #include 34 | 35 | static const char* titles[4] = 36 | { 37 | "Foo", 38 | "Bar", 39 | "Baz", 40 | "Quux" 41 | }; 42 | 43 | static void error_callback(int error, const char* description) 44 | { 45 | fprintf(stderr, "Error: %s\n", description); 46 | } 47 | 48 | static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) 49 | { 50 | if (key == GLFW_KEY_SPACE && action == GLFW_PRESS) 51 | { 52 | int xpos, ypos; 53 | glfwGetWindowPos(window, &xpos, &ypos); 54 | glfwSetWindowPos(window, xpos, ypos); 55 | } 56 | } 57 | 58 | int main(void) 59 | { 60 | int i; 61 | GLboolean running = GL_TRUE; 62 | GLFWwindow* windows[4]; 63 | 64 | glfwSetErrorCallback(error_callback); 65 | 66 | if (!glfwInit()) 67 | exit(EXIT_FAILURE); 68 | 69 | glfwWindowHint(GLFW_VISIBLE, GL_FALSE); 70 | 71 | for (i = 0; i < 4; i++) 72 | { 73 | int left, top, right, bottom; 74 | 75 | windows[i] = glfwCreateWindow(200, 200, titles[i], NULL, NULL); 76 | if (!windows[i]) 77 | { 78 | glfwTerminate(); 79 | exit(EXIT_FAILURE); 80 | } 81 | 82 | glfwSetKeyCallback(windows[i], key_callback); 83 | 84 | glfwMakeContextCurrent(windows[i]); 85 | glClearColor((GLclampf) (i & 1), 86 | (GLclampf) (i >> 1), 87 | i ? 0.f : 1.f, 88 | 0.f); 89 | 90 | glfwGetWindowFrameSize(windows[i], &left, &top, &right, &bottom); 91 | glfwSetWindowPos(windows[i], 92 | 100 + (i & 1) * (200 + left + right), 93 | 100 + (i >> 1) * (200 + top + bottom)); 94 | } 95 | 96 | for (i = 0; i < 4; i++) 97 | glfwShowWindow(windows[i]); 98 | 99 | while (running) 100 | { 101 | for (i = 0; i < 4; i++) 102 | { 103 | glfwMakeContextCurrent(windows[i]); 104 | glClear(GL_COLOR_BUFFER_BIT); 105 | glfwSwapBuffers(windows[i]); 106 | 107 | if (glfwWindowShouldClose(windows[i])) 108 | running = GL_FALSE; 109 | } 110 | 111 | glfwPollEvents(); 112 | } 113 | 114 | glfwTerminate(); 115 | exit(EXIT_SUCCESS); 116 | } 117 | 118 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/wgl_context.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 WGL - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2010 Camilla Berglund 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #ifndef _wgl_context_h_ 29 | #define _wgl_context_h_ 30 | 31 | // This path may need to be changed if you build GLFW using your own setup 32 | // We ship and use our own copy of wglext.h since GLFW uses fairly new 33 | // extensions and not all operating systems come with an up-to-date version 34 | #include "../deps/GL/wglext.h" 35 | 36 | #define _GLFW_PLATFORM_FBCONFIG int wgl 37 | #define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextWGL wgl 38 | #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl 39 | 40 | 41 | // WGL-specific per-context data 42 | // 43 | typedef struct _GLFWcontextWGL 44 | { 45 | HDC dc; // Private GDI device context 46 | HGLRC context; // Permanent rendering context 47 | 48 | // WGL extensions (context specific) 49 | PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT; 50 | PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB; 51 | PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT; 52 | PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB; 53 | PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB; 54 | GLboolean EXT_swap_control; 55 | GLboolean ARB_multisample; 56 | GLboolean ARB_framebuffer_sRGB; 57 | GLboolean ARB_pixel_format; 58 | GLboolean ARB_create_context; 59 | GLboolean ARB_create_context_profile; 60 | GLboolean EXT_create_context_es2_profile; 61 | GLboolean ARB_create_context_robustness; 62 | GLboolean ARB_context_flush_control; 63 | 64 | } _GLFWcontextWGL; 65 | 66 | 67 | // WGL-specific global data 68 | // 69 | typedef struct _GLFWlibraryWGL 70 | { 71 | // opengl32.dll (for glfwGetProcAddress) 72 | struct { 73 | HINSTANCE instance; 74 | } opengl32; 75 | 76 | } _GLFWlibraryWGL; 77 | 78 | 79 | int _glfwInitContextAPI(void); 80 | void _glfwTerminateContextAPI(void); 81 | int _glfwCreateContext(_GLFWwindow* window, 82 | const _GLFWctxconfig* ctxconfig, 83 | const _GLFWfbconfig* fbconfig); 84 | void _glfwDestroyContext(_GLFWwindow* window); 85 | int _glfwAnalyzeContext(const _GLFWwindow* window, 86 | const _GLFWctxconfig* ctxconfig, 87 | const _GLFWfbconfig* fbconfig); 88 | 89 | #endif // _wgl_context_h_ 90 | -------------------------------------------------------------------------------- /lib/glfw-3.1.1/src/cocoa_platform.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.1 OS X - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2009-2010 Camilla Berglund 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #ifndef _cocoa_platform_h_ 28 | #define _cocoa_platform_h_ 29 | 30 | 31 | #include 32 | 33 | #if defined(__OBJC__) 34 | #import 35 | #else 36 | #include 37 | typedef void* id; 38 | #endif 39 | 40 | #include "posix_tls.h" 41 | 42 | #if defined(_GLFW_NSGL) 43 | #include "nsgl_context.h" 44 | #else 45 | #error "No supported context creation API selected" 46 | #endif 47 | 48 | #include "iokit_joystick.h" 49 | 50 | #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS ns 51 | #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns 52 | #define _GLFW_PLATFORM_LIBRARY_TIME_STATE _GLFWtimeNS ns_time 53 | #define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS ns 54 | #define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorNS ns 55 | 56 | 57 | // Cocoa-specific per-window data 58 | // 59 | typedef struct _GLFWwindowNS 60 | { 61 | id object; 62 | id delegate; 63 | id view; 64 | unsigned int modifierFlags; 65 | 66 | // The total sum of the distances the cursor has been warped 67 | // since the last cursor motion event was processed 68 | // This is kept to counteract Cocoa doing the same internally 69 | double warpDeltaX, warpDeltaY; 70 | 71 | } _GLFWwindowNS; 72 | 73 | 74 | // Cocoa-specific global data 75 | // 76 | typedef struct _GLFWlibraryNS 77 | { 78 | CGEventSourceRef eventSource; 79 | id delegate; 80 | id autoreleasePool; 81 | id cursor; 82 | 83 | short int publicKeys[256]; 84 | char* clipboardString; 85 | 86 | } _GLFWlibraryNS; 87 | 88 | 89 | // Cocoa-specific per-monitor data 90 | // 91 | typedef struct _GLFWmonitorNS 92 | { 93 | CGDirectDisplayID displayID; 94 | CGDisplayModeRef previousMode; 95 | id screen; 96 | 97 | } _GLFWmonitorNS; 98 | 99 | 100 | // Cocoa-specific per-cursor data 101 | // 102 | typedef struct _GLFWcursorNS 103 | { 104 | id object; 105 | 106 | } _GLFWcursorNS; 107 | 108 | 109 | // Cocoa-specific global timer data 110 | // 111 | typedef struct _GLFWtimeNS 112 | { 113 | double base; 114 | double resolution; 115 | 116 | } _GLFWtimeNS; 117 | 118 | 119 | void _glfwInitTimer(void); 120 | 121 | GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired); 122 | void _glfwRestoreVideoMode(_GLFWmonitor* monitor); 123 | 124 | #endif // _cocoa_platform_h_ 125 | --------------------------------------------------------------------------------