ruby_rpg 0.0.5 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +43 -21
- data/bin/build.bash +13 -13
- data/bin/import +54 -44
- data/ext/gl_native/extconf.rb +20 -0
- data/ext/gl_native/gl_native.c +563 -0
- data/ext/glfw_native/extconf.rb +18 -0
- data/ext/glfw_native/glfw_native.c +451 -0
- data/lib/engine/assets/_imported/cube.index_data +36 -0
- data/lib/engine/assets/_imported/cube.vertex_data +720 -0
- data/lib/engine/assets/_imported/plane.index_data +6 -0
- data/lib/engine/assets/_imported/plane.vertex_data +120 -0
- data/lib/engine/assets/_imported/sphere.index_data +2880 -0
- data/lib/engine/assets/_imported/sphere.vertex_data +57600 -0
- data/lib/engine/assets/cube.obj +46 -0
- data/lib/engine/assets/plane.obj +16 -0
- data/lib/engine/assets/sphere.obj +2488 -0
- data/lib/engine/autoloader.rb +11 -11
- data/lib/engine/camera.rb +12 -12
- data/lib/engine/component.rb +65 -63
- data/lib/engine/components/audio_source.rb +43 -41
- data/lib/engine/components/direction_light.rb +102 -23
- data/lib/engine/components/orthographic_camera.rb +60 -54
- data/lib/engine/components/perspective_camera.rb +76 -53
- data/lib/engine/components/point_light.rb +80 -24
- data/lib/engine/components/renderers/font_renderer.rb +19 -0
- data/lib/engine/components/renderers/font_renderer_base.rb +134 -0
- data/lib/engine/components/renderers/mesh_renderer.rb +41 -0
- data/lib/engine/components/renderers/sprite_renderer.rb +46 -0
- data/lib/engine/components/spot_light.rb +90 -0
- data/lib/engine/components/sprite_animator.rb +42 -0
- data/lib/engine/components/ui/flex/layout.rb +94 -0
- data/lib/engine/components/ui/flex/pack_layout.rb +65 -0
- data/lib/engine/components/ui/flex/stretch_layout.rb +52 -0
- data/lib/engine/components/ui/flex.rb +60 -0
- data/lib/engine/components/ui/font_renderer.rb +57 -0
- data/lib/engine/components/ui/rect.rb +117 -0
- data/lib/engine/components/ui/sprite_clickbox.rb +47 -0
- data/lib/engine/components/ui/sprite_renderer.rb +117 -0
- data/lib/engine/compute_shader.rb +14 -93
- data/lib/engine/compute_texture.rb +13 -0
- data/lib/engine/cursor.rb +43 -43
- data/lib/engine/debugging.rb +41 -41
- data/lib/engine/engine.rb +127 -131
- data/lib/engine/font.rb +99 -74
- data/lib/engine/game_object.rb +306 -234
- data/lib/engine/gl.rb +439 -0
- data/lib/engine/glfw.rb +151 -0
- data/lib/engine/importers/font_importer.rb +69 -69
- data/lib/engine/importers/obj_file.rb +244 -244
- data/lib/engine/importers/obj_importer.rb +33 -33
- data/lib/engine/input.rb +212 -105
- data/lib/engine/material.rb +214 -79
- data/lib/engine/matrix_helpers.rb +38 -0
- data/lib/engine/mesh.rb +68 -43
- data/lib/engine/metal/compute_shader.rb +118 -0
- data/lib/engine/metal/compute_texture.rb +176 -0
- data/lib/engine/metal/device.rb +98 -0
- data/lib/engine/metal/metal_bindings.rb +126 -0
- data/lib/engine/opengl/compute_shader.rb +77 -0
- data/lib/engine/opengl/compute_texture.rb +31 -0
- data/lib/engine/path.rb +92 -92
- data/lib/engine/physics/collision.rb +12 -12
- data/lib/engine/physics/components/cube_collider.rb +6 -6
- data/lib/engine/physics/components/rigidbody.rb +106 -103
- data/lib/engine/physics/components/sphere_collider.rb +103 -93
- data/lib/engine/physics/physics_resolver.rb +49 -37
- data/lib/engine/polygon_mesh.rb +45 -45
- data/lib/engine/quaternion.rb +234 -234
- data/lib/engine/rendering/cubemap_shadow_map_array.rb +77 -0
- data/lib/engine/rendering/gpu_timer.rb +68 -0
- data/lib/engine/rendering/instance_renderer.rb +232 -153
- data/lib/engine/rendering/post_processing/bloom_effect.rb +87 -0
- data/lib/engine/rendering/post_processing/depth_debug_effect.rb +17 -0
- data/lib/engine/rendering/post_processing/depth_of_field_effect.rb +52 -0
- data/lib/engine/rendering/post_processing/effect.rb +11 -0
- data/lib/engine/rendering/post_processing/post_processing_effect.rb +86 -0
- data/lib/engine/rendering/post_processing/single_pass_effect.rb +19 -0
- data/lib/engine/rendering/post_processing/ssao_effect.rb +182 -0
- data/lib/engine/rendering/post_processing/ssr_effect.rb +89 -0
- data/lib/engine/rendering/post_processing/tint_effect.rb +18 -0
- data/lib/engine/rendering/render_pipeline.rb +267 -35
- data/lib/engine/rendering/render_texture.rb +118 -0
- data/lib/engine/rendering/screen_quad.rb +64 -0
- data/lib/engine/rendering/shadow_map_array.rb +72 -0
- data/lib/engine/rendering/skybox_cubemap.rb +119 -0
- data/lib/engine/rendering/skybox_renderer.rb +64 -0
- data/lib/engine/rendering/ui/stencil_manager.rb +69 -0
- data/lib/engine/screenshoter.rb +34 -34
- data/lib/engine/serialization/graph_serializer.rb +74 -0
- data/lib/engine/serialization/object_serializer.rb +98 -0
- data/lib/engine/serialization/serializable.rb +78 -0
- data/lib/engine/serialization/yaml_persistence.rb +45 -0
- data/lib/engine/shader.rb +215 -119
- data/lib/engine/shaders/colour_frag.glsl +16 -8
- data/lib/engine/shaders/colour_vertex.glsl +20 -13
- data/lib/engine/shaders/fullscreen_frag.glsl +11 -0
- data/lib/engine/shaders/fullscreen_vertex.glsl +12 -0
- data/lib/engine/shaders/instanced_sprite_frag.glsl +21 -0
- data/lib/engine/shaders/{skybox_vert.glsl → instanced_sprite_vertex.glsl} +15 -14
- data/lib/engine/shaders/lighting/directional_light.glsl +49 -0
- data/lib/engine/shaders/lighting/lighting.glsl +33 -0
- data/lib/engine/shaders/lighting/lighting_common.glsl +13 -0
- data/lib/engine/shaders/lighting/point_light.glsl +46 -0
- data/lib/engine/shaders/lighting/spot_light.glsl +80 -0
- data/lib/engine/shaders/mesh_frag.glsl +53 -102
- data/lib/engine/shaders/mesh_vertex.glsl +25 -25
- data/lib/engine/shaders/point_shadow_frag.glsl +12 -0
- data/lib/engine/shaders/point_shadow_vertex.glsl +15 -0
- data/lib/engine/shaders/post_process/bloom_blur_frag.glsl +25 -0
- data/lib/engine/shaders/post_process/bloom_combine_frag.glsl +19 -0
- data/lib/engine/shaders/post_process/bloom_threshold_frag.glsl +19 -0
- data/lib/engine/shaders/post_process/debug_normals_frag.glsl +21 -0
- data/lib/engine/shaders/post_process/depth_debug_frag.glsl +17 -0
- data/lib/engine/shaders/post_process/dof_blur_frag.glsl +52 -0
- data/lib/engine/shaders/post_process/skybox_frag.glsl +29 -0
- data/lib/engine/shaders/post_process/ssao/blur_frag.glsl +50 -0
- data/lib/engine/shaders/post_process/ssao/combine_frag.glsl +15 -0
- data/lib/engine/shaders/post_process/ssao/frag.glsl +99 -0
- data/lib/engine/shaders/post_process/ssr/combine_frag.glsl +16 -0
- data/lib/engine/shaders/post_process/ssr/frag.glsl +118 -0
- data/lib/engine/shaders/post_process/tint_frag.glsl +14 -0
- data/lib/engine/shaders/shadow_frag.glsl +6 -0
- data/lib/engine/shaders/shadow_vertex.glsl +11 -0
- data/lib/engine/shaders/skybox_cubemap_frag.glsl +46 -0
- data/lib/engine/shaders/sprite_frag.glsl +17 -17
- data/lib/engine/shaders/sprite_vertex.glsl +15 -15
- data/lib/engine/shaders/text_frag.glsl +15 -15
- data/lib/engine/shaders/text_vertex.glsl +31 -31
- data/lib/engine/shaders/ui_sprite_frag.glsl +15 -15
- data/lib/engine/shaders/ui_sprite_vertex.glsl +15 -15
- data/lib/engine/shaders/vertex_lit_frag.glsl +33 -89
- data/lib/engine/shaders/vertex_lit_vertex.glsl +28 -28
- data/lib/engine/standard_meshes/quad_mesh.rb +26 -0
- data/lib/engine/standard_objects/cube.rb +23 -0
- data/lib/engine/standard_objects/default_material.rb +20 -0
- data/lib/engine/standard_objects/plane.rb +23 -0
- data/lib/engine/standard_objects/sphere.rb +23 -0
- data/lib/engine/tangent_calculator.rb +42 -42
- data/lib/engine/texture.rb +62 -53
- data/lib/engine/ui/rect.rb +16 -0
- data/lib/engine/video_mode.rb +37 -37
- data/lib/engine/window.rb +126 -126
- data/lib/ruby_rpg.rb +116 -58
- data/vendor/glew-2.2.0-win32/LICENSE.txt +73 -0
- data/vendor/glew-2.2.0-win32/bin/Release/x64/glew32.dll +0 -0
- data/vendor/glew-2.2.0-win32/include/GL/glew.h +26427 -0
- data/vendor/glew-2.2.0-win32/lib/Release/x64/glew32.lib +0 -0
- data/{glfw-3.3.9.bin.MACOS → vendor/glfw-3.3.9.bin.MACOS}/lib-arm64/libglfw.3.dylib +0 -0
- data/{glfw-3.3.9.bin.MACOS → vendor/glfw-3.4.bin.WIN64}/LICENSE.md +23 -23
- metadata +122 -463
- data/glfw-3.3.9.bin.MACOS/README.md +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/bc_s.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/bc_sd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/build_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/build_guide.html +0 -199
- data/glfw-3.3.9.bin.MACOS/docs/html/closed.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/compat_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/compat_guide.html +0 -153
- data/glfw-3.3.9.bin.MACOS/docs/html/compile_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/compile_guide.html +0 -223
- data/glfw-3.3.9.bin.MACOS/docs/html/context_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/context_guide.html +0 -259
- data/glfw-3.3.9.bin.MACOS/docs/html/deprecated.html +0 -88
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_08423ce7729c4554356a7de7171ba263.html +0 -85
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_2dcebcdf14b42e92a6ed85c61bda6b9d.html +0 -93
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_62ce056722ee97c199075aa1d6eca309.html +0 -95
- data/glfw-3.3.9.bin.MACOS/docs/html/dir_dddf4cf62655095a666cf715de3a31a2.html +0 -91
- data/glfw-3.3.9.bin.MACOS/docs/html/doc.svg +0 -12
- data/glfw-3.3.9.bin.MACOS/docs/html/docd.svg +0 -12
- data/glfw-3.3.9.bin.MACOS/docs/html/doxygen.css +0 -1685
- data/glfw-3.3.9.bin.MACOS/docs/html/doxygen.svg +0 -28
- data/glfw-3.3.9.bin.MACOS/docs/html/dynsections.js +0 -192
- data/glfw-3.3.9.bin.MACOS/docs/html/extra.css +0 -1
- data/glfw-3.3.9.bin.MACOS/docs/html/files.html +0 -91
- data/glfw-3.3.9.bin.MACOS/docs/html/folderclosed.svg +0 -11
- data/glfw-3.3.9.bin.MACOS/docs/html/folderclosedd.svg +0 -11
- data/glfw-3.3.9.bin.MACOS/docs/html/folderopen.svg +0 -17
- data/glfw-3.3.9.bin.MACOS/docs/html/folderopend.svg +0 -12
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3_8h.html +0 -1661
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3_8h_source.html +0 -1175
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3native_8h.html +0 -167
- data/glfw-3.3.9.bin.MACOS/docs/html/glfw3native_8h_source.html +0 -303
- data/glfw-3.3.9.bin.MACOS/docs/html/group__buttons.html +0 -282
- data/glfw-3.3.9.bin.MACOS/docs/html/group__context.html +0 -304
- data/glfw-3.3.9.bin.MACOS/docs/html/group__errors.html +0 -304
- data/glfw-3.3.9.bin.MACOS/docs/html/group__gamepad__axes.html +0 -202
- data/glfw-3.3.9.bin.MACOS/docs/html/group__gamepad__buttons.html +0 -410
- data/glfw-3.3.9.bin.MACOS/docs/html/group__hat__state.html +0 -234
- data/glfw-3.3.9.bin.MACOS/docs/html/group__init.html +0 -570
- data/glfw-3.3.9.bin.MACOS/docs/html/group__input.html +0 -2255
- data/glfw-3.3.9.bin.MACOS/docs/html/group__joysticks.html +0 -362
- data/glfw-3.3.9.bin.MACOS/docs/html/group__keys.html +0 -2034
- data/glfw-3.3.9.bin.MACOS/docs/html/group__mods.html +0 -198
- data/glfw-3.3.9.bin.MACOS/docs/html/group__monitor.html +0 -848
- data/glfw-3.3.9.bin.MACOS/docs/html/group__native.html +0 -812
- data/glfw-3.3.9.bin.MACOS/docs/html/group__shapes.html +0 -198
- data/glfw-3.3.9.bin.MACOS/docs/html/group__vulkan.html +0 -359
- data/glfw-3.3.9.bin.MACOS/docs/html/group__window.html +0 -3434
- data/glfw-3.3.9.bin.MACOS/docs/html/index.html +0 -100
- data/glfw-3.3.9.bin.MACOS/docs/html/input_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/input_guide.html +0 -570
- data/glfw-3.3.9.bin.MACOS/docs/html/internal_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/internals_guide.html +0 -132
- data/glfw-3.3.9.bin.MACOS/docs/html/intro_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/intro_guide.html +0 -351
- data/glfw-3.3.9.bin.MACOS/docs/html/jquery.js +0 -34
- data/glfw-3.3.9.bin.MACOS/docs/html/main_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/menu.js +0 -136
- data/glfw-3.3.9.bin.MACOS/docs/html/menudata.js +0 -29
- data/glfw-3.3.9.bin.MACOS/docs/html/minus.svg +0 -8
- data/glfw-3.3.9.bin.MACOS/docs/html/minusd.svg +0 -8
- data/glfw-3.3.9.bin.MACOS/docs/html/monitor_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/monitor_guide.html +0 -229
- data/glfw-3.3.9.bin.MACOS/docs/html/moving_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/moving_guide.html +0 -374
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_f.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_fd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_g.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_h.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/nav_hd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/news.html +0 -634
- data/glfw-3.3.9.bin.MACOS/docs/html/news_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/open.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/pages.html +0 -99
- data/glfw-3.3.9.bin.MACOS/docs/html/plus.svg +0 -9
- data/glfw-3.3.9.bin.MACOS/docs/html/plusd.svg +0 -9
- data/glfw-3.3.9.bin.MACOS/docs/html/quick_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/quick_guide.html +0 -397
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_0.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_1.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_10.js +0 -65
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_11.js +0 -26
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_12.js +0 -44
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_13.js +0 -34
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_14.js +0 -12
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_15.js +0 -52
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_16.js +0 -69
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_17.js +0 -51
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_18.js +0 -14
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_19.js +0 -36
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_1a.js +0 -98
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_1b.js +0 -12
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_2.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_3.js +0 -9
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_4.js +0 -57
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_5.js +0 -22
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_6.js +0 -103
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_7.js +0 -23
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_8.js +0 -35
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_9.js +0 -63
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_a.js +0 -505
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_b.js +0 -24
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_c.js +0 -50
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_d.js +0 -17
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_e.js +0 -12
- data/glfw-3.3.9.bin.MACOS/docs/html/search/all_f.js +0 -35
- data/glfw-3.3.9.bin.MACOS/docs/html/search/classes_0.js +0 -7
- data/glfw-3.3.9.bin.MACOS/docs/html/search/close.svg +0 -18
- data/glfw-3.3.9.bin.MACOS/docs/html/search/defines_0.js +0 -34
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_0.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_1.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_2.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_3.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_4.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_5.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_6.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_7.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/files_8.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/functions_0.js +0 -146
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_0.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_1.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_10.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_2.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_3.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_4.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_5.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_6.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_7.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_8.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_9.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_a.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_b.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_c.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_d.js +0 -7
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_e.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/groups_f.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag.svg +0 -24
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag_d.svg +0 -24
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag_sel.svg +0 -31
- data/glfw-3.3.9.bin.MACOS/docs/html/search/mag_seld.svg +0 -31
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_0.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_1.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_10.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_2.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_3.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_4.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_5.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_6.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_7.js +0 -7
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_8.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_9.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_a.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_b.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_c.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_d.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_e.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/pages_f.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/search.css +0 -291
- data/glfw-3.3.9.bin.MACOS/docs/html/search/search.js +0 -840
- data/glfw-3.3.9.bin.MACOS/docs/html/search/searchdata.js +0 -39
- data/glfw-3.3.9.bin.MACOS/docs/html/search/typedefs_0.js +0 -32
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_0.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_1.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_2.js +0 -5
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_3.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_4.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_5.js +0 -6
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_6.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/search/variables_7.js +0 -4
- data/glfw-3.3.9.bin.MACOS/docs/html/spaces.svg +0 -877
- data/glfw-3.3.9.bin.MACOS/docs/html/splitbar.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/splitbard.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wgamepadstate.html +0 -134
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wgammaramp.html +0 -170
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wimage.html +0 -151
- data/glfw-3.3.9.bin.MACOS/docs/html/struct_g_l_f_wvidmode.html +0 -204
- data/glfw-3.3.9.bin.MACOS/docs/html/sync_off.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/sync_on.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_a.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_ad.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_b.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_bd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_h.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_hd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_s.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tab_sd.png +0 -0
- data/glfw-3.3.9.bin.MACOS/docs/html/tabs.css +0 -1
- data/glfw-3.3.9.bin.MACOS/docs/html/vulkan_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/vulkan_guide.html +0 -196
- data/glfw-3.3.9.bin.MACOS/docs/html/window_8dox.html +0 -81
- data/glfw-3.3.9.bin.MACOS/docs/html/window_guide.html +0 -763
- data/glfw-3.3.9.bin.MACOS/include/GLFW/glfw3.h +0 -5932
- data/glfw-3.3.9.bin.MACOS/include/GLFW/glfw3native.h +0 -634
- data/glfw-3.3.9.bin.MACOS/lib-arm64/libglfw3.a +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-universal/libglfw.3.dylib +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-universal/libglfw3.a +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-x86_64/libglfw.3.dylib +0 -0
- data/glfw-3.3.9.bin.MACOS/lib-x86_64/libglfw3.a +0 -0
- data/glfw-3.4.bin.WIN64/README.md +0 -70
- data/glfw-3.4.bin.WIN64/docs/html/bc_s.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/bc_sd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/build_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/build_guide.html +0 -217
- data/glfw-3.4.bin.WIN64/docs/html/closed.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/compat_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/compat_guide.html +0 -156
- data/glfw-3.4.bin.WIN64/docs/html/compile_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/compile_guide.html +0 -219
- data/glfw-3.4.bin.WIN64/docs/html/context_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/context_guide.html +0 -258
- data/glfw-3.4.bin.WIN64/docs/html/deprecated.html +0 -88
- data/glfw-3.4.bin.WIN64/docs/html/dir_13577e2d8b9423099662de029791bd7d.html +0 -93
- data/glfw-3.4.bin.WIN64/docs/html/dir_7f92719a7fe62e5b064f87d7a3c220b1.html +0 -95
- data/glfw-3.4.bin.WIN64/docs/html/dir_a788ef6c2b1e5b367804e0b6ccfd6f11.html +0 -85
- data/glfw-3.4.bin.WIN64/docs/html/dir_b11153cd0f4fd04a7564cc166f482635.html +0 -91
- data/glfw-3.4.bin.WIN64/docs/html/doc.svg +0 -12
- data/glfw-3.4.bin.WIN64/docs/html/docd.svg +0 -12
- data/glfw-3.4.bin.WIN64/docs/html/doxygen.css +0 -1685
- data/glfw-3.4.bin.WIN64/docs/html/doxygen.svg +0 -28
- data/glfw-3.4.bin.WIN64/docs/html/dynsections.js +0 -192
- data/glfw-3.4.bin.WIN64/docs/html/extra.css +0 -2
- data/glfw-3.4.bin.WIN64/docs/html/files.html +0 -91
- data/glfw-3.4.bin.WIN64/docs/html/folderclosed.svg +0 -11
- data/glfw-3.4.bin.WIN64/docs/html/folderclosedd.svg +0 -11
- data/glfw-3.4.bin.WIN64/docs/html/folderopen.svg +0 -17
- data/glfw-3.4.bin.WIN64/docs/html/folderopend.svg +0 -12
- data/glfw-3.4.bin.WIN64/docs/html/glfw3_8h.html +0 -1910
- data/glfw-3.4.bin.WIN64/docs/html/glfw3_8h_source.html +0 -1260
- data/glfw-3.4.bin.WIN64/docs/html/glfw3native_8h.html +0 -170
- data/glfw-3.4.bin.WIN64/docs/html/glfw3native_8h_source.html +0 -306
- data/glfw-3.4.bin.WIN64/docs/html/group__buttons.html +0 -282
- data/glfw-3.4.bin.WIN64/docs/html/group__context.html +0 -304
- data/glfw-3.4.bin.WIN64/docs/html/group__errors.html +0 -384
- data/glfw-3.4.bin.WIN64/docs/html/group__gamepad__axes.html +0 -202
- data/glfw-3.4.bin.WIN64/docs/html/group__gamepad__buttons.html +0 -410
- data/glfw-3.4.bin.WIN64/docs/html/group__hat__state.html +0 -234
- data/glfw-3.4.bin.WIN64/docs/html/group__init.html +0 -1015
- data/glfw-3.4.bin.WIN64/docs/html/group__input.html +0 -2285
- data/glfw-3.4.bin.WIN64/docs/html/group__joysticks.html +0 -362
- data/glfw-3.4.bin.WIN64/docs/html/group__keys.html +0 -2034
- data/glfw-3.4.bin.WIN64/docs/html/group__mods.html +0 -198
- data/glfw-3.4.bin.WIN64/docs/html/group__monitor.html +0 -849
- data/glfw-3.4.bin.WIN64/docs/html/group__native.html +0 -837
- data/glfw-3.4.bin.WIN64/docs/html/group__shapes.html +0 -337
- data/glfw-3.4.bin.WIN64/docs/html/group__vulkan.html +0 -361
- data/glfw-3.4.bin.WIN64/docs/html/group__window.html +0 -3608
- data/glfw-3.4.bin.WIN64/docs/html/index.html +0 -100
- data/glfw-3.4.bin.WIN64/docs/html/input_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/input_guide.html +0 -576
- data/glfw-3.4.bin.WIN64/docs/html/internal_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/internals_guide.html +0 -135
- data/glfw-3.4.bin.WIN64/docs/html/intro_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/intro_guide.html +0 -429
- data/glfw-3.4.bin.WIN64/docs/html/jquery.js +0 -34
- data/glfw-3.4.bin.WIN64/docs/html/main_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/menu.js +0 -136
- data/glfw-3.4.bin.WIN64/docs/html/menudata.js +0 -30
- data/glfw-3.4.bin.WIN64/docs/html/minus.svg +0 -8
- data/glfw-3.4.bin.WIN64/docs/html/minusd.svg +0 -8
- data/glfw-3.4.bin.WIN64/docs/html/monitor_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/monitor_guide.html +0 -228
- data/glfw-3.4.bin.WIN64/docs/html/moving_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/moving_guide.html +0 -360
- data/glfw-3.4.bin.WIN64/docs/html/nav_f.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_fd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_g.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_h.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/nav_hd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/news.html +0 -336
- data/glfw-3.4.bin.WIN64/docs/html/news_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/open.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/pages.html +0 -99
- data/glfw-3.4.bin.WIN64/docs/html/plus.svg +0 -9
- data/glfw-3.4.bin.WIN64/docs/html/plusd.svg +0 -9
- data/glfw-3.4.bin.WIN64/docs/html/quick_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/quick_guide.html +0 -406
- data/glfw-3.4.bin.WIN64/docs/html/search/all_0.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_10.js +0 -13
- data/glfw-3.4.bin.WIN64/docs/html/search/all_11.js +0 -11
- data/glfw-3.4.bin.WIN64/docs/html/search/all_12.js +0 -26
- data/glfw-3.4.bin.WIN64/docs/html/search/all_13.js +0 -51
- data/glfw-3.4.bin.WIN64/docs/html/search/all_14.js +0 -22
- data/glfw-3.4.bin.WIN64/docs/html/search/all_15.js +0 -35
- data/glfw-3.4.bin.WIN64/docs/html/search/all_16.js +0 -29
- data/glfw-3.4.bin.WIN64/docs/html/search/all_17.js +0 -8
- data/glfw-3.4.bin.WIN64/docs/html/search/all_18.js +0 -44
- data/glfw-3.4.bin.WIN64/docs/html/search/all_19.js +0 -60
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1a.js +0 -39
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1b.js +0 -8
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1c.js +0 -32
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1d.js +0 -84
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1e.js +0 -13
- data/glfw-3.4.bin.WIN64/docs/html/search/all_1f.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_2.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/all_3.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_4.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_5.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_6.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/all_7.js +0 -58
- data/glfw-3.4.bin.WIN64/docs/html/search/all_8.js +0 -21
- data/glfw-3.4.bin.WIN64/docs/html/search/all_9.js +0 -82
- data/glfw-3.4.bin.WIN64/docs/html/search/all_a.js +0 -20
- data/glfw-3.4.bin.WIN64/docs/html/search/all_b.js +0 -26
- data/glfw-3.4.bin.WIN64/docs/html/search/all_c.js +0 -35
- data/glfw-3.4.bin.WIN64/docs/html/search/all_d.js +0 -555
- data/glfw-3.4.bin.WIN64/docs/html/search/all_e.js +0 -23
- data/glfw-3.4.bin.WIN64/docs/html/search/all_f.js +0 -40
- data/glfw-3.4.bin.WIN64/docs/html/search/classes_0.js +0 -8
- data/glfw-3.4.bin.WIN64/docs/html/search/close.svg +0 -18
- data/glfw-3.4.bin.WIN64/docs/html/search/defines_0.js +0 -43
- data/glfw-3.4.bin.WIN64/docs/html/search/files_0.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/files_1.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/files_2.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/files_3.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/files_4.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/files_5.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/files_6.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/files_7.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/files_8.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/functions_0.js +0 -152
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_0.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_1.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_10.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_2.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_3.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_4.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_5.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_6.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_7.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_8.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_9.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_a.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_b.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_c.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_d.js +0 -7
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_e.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/groups_f.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/mag.svg +0 -24
- data/glfw-3.4.bin.WIN64/docs/html/search/mag_d.svg +0 -24
- data/glfw-3.4.bin.WIN64/docs/html/search/mag_sel.svg +0 -31
- data/glfw-3.4.bin.WIN64/docs/html/search/mag_seld.svg +0 -31
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_0.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_1.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_10.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_11.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_2.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_3.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_4.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_5.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_6.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_7.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_8.js +0 -7
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_9.js +0 -7
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_a.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_b.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_c.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_d.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_e.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/pages_f.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/search.css +0 -291
- data/glfw-3.4.bin.WIN64/docs/html/search/search.js +0 -840
- data/glfw-3.4.bin.WIN64/docs/html/search/searchdata.js +0 -39
- data/glfw-3.4.bin.WIN64/docs/html/search/typedefs_0.js +0 -36
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_0.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_1.js +0 -6
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_2.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_3.js +0 -5
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_4.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_5.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_6.js +0 -7
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_7.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_8.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/search/variables_9.js +0 -4
- data/glfw-3.4.bin.WIN64/docs/html/spaces.svg +0 -877
- data/glfw-3.4.bin.WIN64/docs/html/splitbar.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/splitbard.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wallocator.html +0 -168
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wgamepadstate.html +0 -134
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wgammaramp.html +0 -170
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wimage.html +0 -151
- data/glfw-3.4.bin.WIN64/docs/html/struct_g_l_f_wvidmode.html +0 -204
- data/glfw-3.4.bin.WIN64/docs/html/sync_off.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/sync_on.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_a.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_ad.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_b.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_bd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_h.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_hd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_s.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tab_sd.png +0 -0
- data/glfw-3.4.bin.WIN64/docs/html/tabs.css +0 -1
- data/glfw-3.4.bin.WIN64/docs/html/topics.html +0 -101
- data/glfw-3.4.bin.WIN64/docs/html/vulkan_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/vulkan_guide.html +0 -206
- data/glfw-3.4.bin.WIN64/docs/html/window_8md.html +0 -81
- data/glfw-3.4.bin.WIN64/docs/html/window_guide.html +0 -806
- data/glfw-3.4.bin.WIN64/include/GLFW/glfw3.h +0 -6547
- data/glfw-3.4.bin.WIN64/include/GLFW/glfw3native.h +0 -663
- data/glfw-3.4.bin.WIN64/lib-mingw-w64/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-mingw-w64/libglfw3.a +0 -0
- data/glfw-3.4.bin.WIN64/lib-mingw-w64/libglfw3dll.a +0 -0
- data/glfw-3.4.bin.WIN64/lib-static-ucrt/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2013/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2015/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2017/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2019/glfw3dll.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3.dll +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3_mt.lib +0 -0
- data/glfw-3.4.bin.WIN64/lib-vc2022/glfw3dll.lib +0 -0
- data/lib/engine/components/font_renderer.rb +0 -134
- data/lib/engine/components/mesh_renderer.rb +0 -31
- data/lib/engine/components/sprite_renderer.rb +0 -141
- data/lib/engine/components/ui_font_renderer.rb +0 -140
- data/lib/engine/components/ui_sprite_clickbox.rb +0 -62
- data/lib/engine/components/ui_sprite_renderer.rb +0 -101
- data/lib/engine/shaders/skybox_frag.glsl +0 -12
- /data/{glfw-3.4.bin.WIN64 → vendor/glfw-3.3.9.bin.MACOS}/LICENSE.md +0 -0
- /data/{glfw-3.4.bin.WIN64 → vendor/glfw-3.4.bin.WIN64}/lib-static-ucrt/glfw3.dll +0 -0
|
@@ -1,153 +1,232 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Rendering
|
|
4
|
-
class InstanceRenderer
|
|
5
|
-
attr_reader :mesh, :material
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Engine::
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
class InstanceRenderer
|
|
5
|
+
attr_reader :mesh, :material
|
|
6
|
+
|
|
7
|
+
FLOATS_PER_MATRIX = 16
|
|
8
|
+
BYTES_PER_MATRIX = FLOATS_PER_MATRIX * Fiddle::SIZEOF_FLOAT
|
|
9
|
+
|
|
10
|
+
def initialize(mesh, material)
|
|
11
|
+
@mesh = mesh
|
|
12
|
+
@material = material
|
|
13
|
+
@mesh_renderers = []
|
|
14
|
+
@packed_data = String.new(encoding: Encoding::BINARY)
|
|
15
|
+
|
|
16
|
+
setup_vertex_attribute_buffer
|
|
17
|
+
setup_vertex_buffer
|
|
18
|
+
setup_index_buffer
|
|
19
|
+
generate_instance_vbo_buf
|
|
20
|
+
Engine::GL.BindVertexArray(0)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def add_instance(mesh_renderer)
|
|
24
|
+
@mesh_renderers << mesh_renderer
|
|
25
|
+
floats = mesh_renderer.game_object.model_matrix.to_a.flatten
|
|
26
|
+
@packed_data << floats.pack('F*')
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def remove_instance(mesh_renderer)
|
|
30
|
+
index = @mesh_renderers.index(mesh_renderer)
|
|
31
|
+
@mesh_renderers.delete_at(index)
|
|
32
|
+
# Remove this instance's bytes from packed data
|
|
33
|
+
byte_offset = index * BYTES_PER_MATRIX
|
|
34
|
+
@packed_data[byte_offset, BYTES_PER_MATRIX] = ''
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def update_instance(mesh_renderer)
|
|
38
|
+
index = @mesh_renderers.index(mesh_renderer)
|
|
39
|
+
floats = mesh_renderer.game_object.model_matrix.to_a.flatten
|
|
40
|
+
byte_offset = index * BYTES_PER_MATRIX
|
|
41
|
+
@packed_data[byte_offset, BYTES_PER_MATRIX] = floats.pack('F*')
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def draw_all
|
|
45
|
+
set_material_per_frame_data
|
|
46
|
+
|
|
47
|
+
Engine::GL.BindVertexArray(@vao)
|
|
48
|
+
update_vbo_buf
|
|
49
|
+
Engine::GL.BindBuffer(Engine::GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
50
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
51
|
+
|
|
52
|
+
Engine::GL.DrawElementsInstanced(Engine::GL::TRIANGLES, mesh.index_data.length, Engine::GL::UNSIGNED_INT, 0, @mesh_renderers.count)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def draw_depth_only(light_space_matrix)
|
|
56
|
+
return if @mesh_renderers.empty?
|
|
57
|
+
|
|
58
|
+
shadow_shader = Engine::Shader.shadow
|
|
59
|
+
shadow_shader.use
|
|
60
|
+
shadow_shader.set_mat4("lightSpaceMatrix", light_space_matrix)
|
|
61
|
+
|
|
62
|
+
Engine::GL.BindVertexArray(@vao)
|
|
63
|
+
update_vbo_buf
|
|
64
|
+
Engine::GL.BindBuffer(Engine::GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
65
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
66
|
+
|
|
67
|
+
Engine::GL.DrawElementsInstanced(Engine::GL::TRIANGLES, mesh.index_data.length, Engine::GL::UNSIGNED_INT, 0, @mesh_renderers.count)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def draw_point_light_depth(light_space_matrix, light_pos, far_plane)
|
|
71
|
+
return if @mesh_renderers.empty?
|
|
72
|
+
|
|
73
|
+
shader = Engine::Shader.point_shadow
|
|
74
|
+
shader.use
|
|
75
|
+
shader.set_mat4("lightSpaceMatrix", light_space_matrix)
|
|
76
|
+
shader.set_vec3("lightPos", light_pos)
|
|
77
|
+
shader.set_float("farPlane", far_plane)
|
|
78
|
+
|
|
79
|
+
Engine::GL.BindVertexArray(@vao)
|
|
80
|
+
update_vbo_buf
|
|
81
|
+
Engine::GL.BindBuffer(Engine::GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
82
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
83
|
+
|
|
84
|
+
Engine::GL.DrawElementsInstanced(Engine::GL::TRIANGLES, mesh.index_data.length, Engine::GL::UNSIGNED_INT, 0, @mesh_renderers.count)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
private
|
|
88
|
+
|
|
89
|
+
def set_material_per_frame_data
|
|
90
|
+
material.set_mat4("camera", Engine::Camera.instance.matrix)
|
|
91
|
+
material.set_vec3("cameraPos", Engine::Camera.instance.game_object.pos)
|
|
92
|
+
material.set_cubemap("skybox", nil)
|
|
93
|
+
|
|
94
|
+
update_light_data
|
|
95
|
+
material.update_shader
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def update_light_data
|
|
99
|
+
Engine::Components::PointLight.point_lights.each_with_index do |light, i|
|
|
100
|
+
break if i >= 16
|
|
101
|
+
material.set_float("pointLights[#{i}].sqrRange", light.range * light.range)
|
|
102
|
+
material.set_vec3("pointLights[#{i}].position", light.position)
|
|
103
|
+
material.set_vec3("pointLights[#{i}].colour", light.colour)
|
|
104
|
+
has_shadow = light.cast_shadows && !light.shadow_layer_index.nil?
|
|
105
|
+
material.set_int("pointLights[#{i}].castsShadows", has_shadow ? 1 : 0)
|
|
106
|
+
if has_shadow
|
|
107
|
+
material.set_int("pointLights[#{i}].shadowLayerIndex", light.shadow_layer_index)
|
|
108
|
+
material.set_float("pointLights[#{i}].shadowFar", light.shadow_far)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
# Set shared point shadow map cubemap array
|
|
112
|
+
material.set_cubemap_array("pointShadowMaps", RenderPipeline.point_shadow_map_array.depth_texture)
|
|
113
|
+
|
|
114
|
+
Engine::Components::DirectionLight.direction_lights.each_with_index do |light, i|
|
|
115
|
+
break if i >= 4
|
|
116
|
+
material.set_vec3("directionalLights[#{i}].direction", light.direction)
|
|
117
|
+
material.set_vec3("directionalLights[#{i}].colour", light.colour)
|
|
118
|
+
has_shadow = light.cast_shadows && !light.shadow_layer_index.nil?
|
|
119
|
+
material.set_int("directionalLights[#{i}].castsShadows", has_shadow ? 1 : 0)
|
|
120
|
+
|
|
121
|
+
if has_shadow
|
|
122
|
+
material.set_mat4("directionalLights[#{i}].lightSpaceMatrix", light.light_space_matrix)
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
# Set shared directional shadow map array
|
|
126
|
+
material.set_texture_array("directionalShadowMaps", RenderPipeline.directional_shadow_map_array.depth_texture)
|
|
127
|
+
|
|
128
|
+
Engine::Components::SpotLight.spot_lights.each_with_index do |light, i|
|
|
129
|
+
break if i >= 8
|
|
130
|
+
material.set_vec3("spotLights[#{i}].position", light.position)
|
|
131
|
+
material.set_vec3("spotLights[#{i}].direction", light.direction)
|
|
132
|
+
material.set_float("spotLights[#{i}].sqrRange", light.range * light.range)
|
|
133
|
+
material.set_vec3("spotLights[#{i}].colour", light.colour)
|
|
134
|
+
material.set_float("spotLights[#{i}].innerCutoff", light.inner_cutoff)
|
|
135
|
+
material.set_float("spotLights[#{i}].outerCutoff", light.outer_cutoff)
|
|
136
|
+
has_shadow = light.cast_shadows && !light.shadow_layer_index.nil?
|
|
137
|
+
material.set_int("spotLights[#{i}].castsShadows", has_shadow ? 1 : 0)
|
|
138
|
+
|
|
139
|
+
if has_shadow
|
|
140
|
+
material.set_mat4("spotLights[#{i}].lightSpaceMatrix", light.light_space_matrix)
|
|
141
|
+
material.set_float("spotLights[#{i}].shadowNear", light.shadow_near)
|
|
142
|
+
material.set_float("spotLights[#{i}].shadowFar", light.shadow_far)
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
# Set shared spot shadow map array
|
|
146
|
+
material.set_texture_array("spotShadowMaps", RenderPipeline.spot_shadow_map_array.depth_texture)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def setup_index_buffer
|
|
150
|
+
indices = mesh.index_data
|
|
151
|
+
|
|
152
|
+
ebo_buf = ' ' * 4
|
|
153
|
+
Engine::GL.GenBuffers(1, ebo_buf)
|
|
154
|
+
@ebo = ebo_buf.unpack('L')[0]
|
|
155
|
+
Engine::GL.BindBuffer(Engine::GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
156
|
+
Engine::GL.BufferData(
|
|
157
|
+
Engine::GL::ELEMENT_ARRAY_BUFFER, indices.length * Fiddle::SIZEOF_INT,
|
|
158
|
+
indices.pack('I*'), Engine::GL::STATIC_DRAW
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def setup_vertex_attribute_buffer
|
|
163
|
+
vao_buf = ' ' * 4
|
|
164
|
+
Engine::GL.GenVertexArrays(1, vao_buf)
|
|
165
|
+
@vao = vao_buf.unpack('L')[0]
|
|
166
|
+
Engine::GL.BindVertexArray(@vao)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def setup_vertex_buffer
|
|
170
|
+
vbo_buf = ' ' * 4
|
|
171
|
+
Engine::GL.GenBuffers(1, vbo_buf)
|
|
172
|
+
vbo = vbo_buf.unpack('L')[0]
|
|
173
|
+
points = mesh.vertex_data
|
|
174
|
+
|
|
175
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, vbo)
|
|
176
|
+
Engine::GL.BufferData(
|
|
177
|
+
Engine::GL::ARRAY_BUFFER, @mesh.vertex_data.length * Fiddle::SIZEOF_FLOAT,
|
|
178
|
+
points.pack('F*'), Engine::GL::STATIC_DRAW
|
|
179
|
+
)
|
|
180
|
+
vertex_data_size = 20 * Fiddle::SIZEOF_FLOAT
|
|
181
|
+
|
|
182
|
+
Engine::GL.VertexAttribPointer(0, 3, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 0)
|
|
183
|
+
Engine::GL.VertexAttribPointer(1, 2, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 3 * Fiddle::SIZEOF_FLOAT)
|
|
184
|
+
Engine::GL.VertexAttribPointer(2, 3, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 5 * Fiddle::SIZEOF_FLOAT)
|
|
185
|
+
Engine::GL.VertexAttribPointer(3, 3, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 8 * Fiddle::SIZEOF_FLOAT)
|
|
186
|
+
Engine::GL.VertexAttribPointer(4, 3, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 11 * Fiddle::SIZEOF_FLOAT)
|
|
187
|
+
Engine::GL.VertexAttribPointer(5, 3, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 14 * Fiddle::SIZEOF_FLOAT)
|
|
188
|
+
Engine::GL.VertexAttribPointer(6, 3, Engine::GL::FLOAT, Engine::GL::FALSE, vertex_data_size, 17 * Fiddle::SIZEOF_FLOAT)
|
|
189
|
+
Engine::GL.EnableVertexAttribArray(0)
|
|
190
|
+
Engine::GL.EnableVertexAttribArray(1)
|
|
191
|
+
Engine::GL.EnableVertexAttribArray(2)
|
|
192
|
+
Engine::GL.EnableVertexAttribArray(3)
|
|
193
|
+
Engine::GL.EnableVertexAttribArray(4)
|
|
194
|
+
Engine::GL.EnableVertexAttribArray(5)
|
|
195
|
+
Engine::GL.EnableVertexAttribArray(6)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
def generate_instance_vbo_buf
|
|
199
|
+
instance_vbo_buf = ' ' * 4
|
|
200
|
+
Engine::GL.GenBuffers(1, instance_vbo_buf)
|
|
201
|
+
@instance_vbo = instance_vbo_buf.unpack('L')[0]
|
|
202
|
+
|
|
203
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
204
|
+
|
|
205
|
+
# Set up vertex attributes once (stored in VAO)
|
|
206
|
+
vec4_size = Fiddle::SIZEOF_FLOAT * 4
|
|
207
|
+
|
|
208
|
+
Engine::GL.EnableVertexAttribArray(7)
|
|
209
|
+
Engine::GL.EnableVertexAttribArray(8)
|
|
210
|
+
Engine::GL.EnableVertexAttribArray(9)
|
|
211
|
+
Engine::GL.EnableVertexAttribArray(10)
|
|
212
|
+
|
|
213
|
+
Engine::GL.VertexAttribPointer(7, 4, Engine::GL::FLOAT, Engine::GL::FALSE, 4 * vec4_size, 0)
|
|
214
|
+
Engine::GL.VertexAttribPointer(8, 4, Engine::GL::FLOAT, Engine::GL::FALSE, 4 * vec4_size, 1 * vec4_size)
|
|
215
|
+
Engine::GL.VertexAttribPointer(9, 4, Engine::GL::FLOAT, Engine::GL::FALSE, 4 * vec4_size, 2 * vec4_size)
|
|
216
|
+
Engine::GL.VertexAttribPointer(10, 4, Engine::GL::FLOAT, Engine::GL::FALSE, 4 * vec4_size, 3 * vec4_size)
|
|
217
|
+
|
|
218
|
+
Engine::GL.VertexAttribDivisor(7, 1)
|
|
219
|
+
Engine::GL.VertexAttribDivisor(8, 1)
|
|
220
|
+
Engine::GL.VertexAttribDivisor(9, 1)
|
|
221
|
+
Engine::GL.VertexAttribDivisor(10, 1)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
def update_vbo_buf
|
|
225
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
226
|
+
Engine::GL.BufferData(
|
|
227
|
+
Engine::GL::ARRAY_BUFFER, @packed_data.bytesize,
|
|
228
|
+
@packed_data, Engine::GL::DYNAMIC_DRAW
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
class BloomEffect
|
|
5
|
+
include Effect
|
|
6
|
+
|
|
7
|
+
def initialize(threshold: 0.7, intensity: 1.0, blur_passes: 2, blur_scale: 1.0)
|
|
8
|
+
@threshold = threshold
|
|
9
|
+
@intensity = intensity
|
|
10
|
+
@blur_passes = blur_passes
|
|
11
|
+
@blur_scale = blur_scale
|
|
12
|
+
|
|
13
|
+
setup_materials
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def apply(input_rt, output_rt, screen_quad)
|
|
17
|
+
ensure_textures(input_rt.width, input_rt.height)
|
|
18
|
+
Engine::GL.Disable(Engine::GL::DEPTH_TEST)
|
|
19
|
+
|
|
20
|
+
# Pass 1: Extract bright pixels
|
|
21
|
+
@ping.bind
|
|
22
|
+
Engine::GL.Clear(Engine::GL::COLOR_BUFFER_BIT)
|
|
23
|
+
screen_quad.draw(@threshold_material, input_rt.color_texture)
|
|
24
|
+
|
|
25
|
+
# Pass 2+: Blur passes (ping-pong between internal textures)
|
|
26
|
+
@blur_passes.times do
|
|
27
|
+
# Horizontal blur
|
|
28
|
+
@pong.bind
|
|
29
|
+
Engine::GL.Clear(Engine::GL::COLOR_BUFFER_BIT)
|
|
30
|
+
@blur_material.set_vec2("direction", [1.0, 0.0])
|
|
31
|
+
screen_quad.draw(@blur_material, @ping.color_texture)
|
|
32
|
+
|
|
33
|
+
# Vertical blur
|
|
34
|
+
@ping.bind
|
|
35
|
+
Engine::GL.Clear(Engine::GL::COLOR_BUFFER_BIT)
|
|
36
|
+
@blur_material.set_vec2("direction", [0.0, 1.0])
|
|
37
|
+
screen_quad.draw(@blur_material, @pong.color_texture)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Pass 3: Combine original + bloom
|
|
41
|
+
output_rt.bind
|
|
42
|
+
Engine::GL.Clear(Engine::GL::COLOR_BUFFER_BIT)
|
|
43
|
+
@combine_material.set_runtime_texture("screenTexture", input_rt.color_texture)
|
|
44
|
+
@combine_material.set_runtime_texture("bloomTexture", @ping.color_texture)
|
|
45
|
+
screen_quad.draw_with_material(@combine_material)
|
|
46
|
+
output_rt
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
private
|
|
50
|
+
|
|
51
|
+
def setup_materials
|
|
52
|
+
@threshold_material = Engine::Material.create(
|
|
53
|
+
shader: Engine::Shader.for(
|
|
54
|
+
'fullscreen_vertex.glsl',
|
|
55
|
+
'post_process/bloom_threshold_frag.glsl',
|
|
56
|
+
source: :engine
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
@threshold_material.set_float("threshold", @threshold)
|
|
60
|
+
|
|
61
|
+
@blur_material = Engine::Material.create(
|
|
62
|
+
shader: Engine::Shader.for(
|
|
63
|
+
'fullscreen_vertex.glsl',
|
|
64
|
+
'post_process/bloom_blur_frag.glsl',
|
|
65
|
+
source: :engine
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
@blur_material.set_float("blurScale", @blur_scale)
|
|
69
|
+
|
|
70
|
+
@combine_material = Engine::Material.create(
|
|
71
|
+
shader: Engine::Shader.for(
|
|
72
|
+
'fullscreen_vertex.glsl',
|
|
73
|
+
'post_process/bloom_combine_frag.glsl',
|
|
74
|
+
source: :engine
|
|
75
|
+
)
|
|
76
|
+
)
|
|
77
|
+
@combine_material.set_float("intensity", @intensity)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def ensure_textures(width, height)
|
|
81
|
+
if @ping.nil? || @ping.width != width || @ping.height != height
|
|
82
|
+
@ping = RenderTexture.new(width, height)
|
|
83
|
+
@pong = RenderTexture.new(width, height)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
class DepthDebugEffect
|
|
5
|
+
include SinglePassEffect
|
|
6
|
+
|
|
7
|
+
def initialize
|
|
8
|
+
@material = Engine::Material.create(
|
|
9
|
+
shader: Engine::Shader.for(
|
|
10
|
+
'fullscreen_vertex.glsl',
|
|
11
|
+
'post_process/depth_debug_frag.glsl',
|
|
12
|
+
source: :engine
|
|
13
|
+
)
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
class DepthOfFieldEffect
|
|
5
|
+
include Effect
|
|
6
|
+
|
|
7
|
+
def initialize(focus_distance: 10.0, focus_range: 50.0, blur_amount: 3.0, near: 0.1, far: 1000.0)
|
|
8
|
+
@focus_distance = focus_distance
|
|
9
|
+
@focus_range = focus_range
|
|
10
|
+
@blur_amount = blur_amount
|
|
11
|
+
@near = near
|
|
12
|
+
@far = far
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def apply(rt_a, rt_b, screen_quad)
|
|
16
|
+
Engine::GL.Disable(Engine::GL::DEPTH_TEST)
|
|
17
|
+
|
|
18
|
+
blur_pass(rt_a, rt_b, [1.0, 0.0], screen_quad) # horizontal
|
|
19
|
+
blur_pass(rt_b, rt_a, [0.0, 1.0], screen_quad) # vertical
|
|
20
|
+
|
|
21
|
+
rt_a
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def blur_pass(source_rt, dest_rt, direction, screen_quad)
|
|
25
|
+
dest_rt.bind
|
|
26
|
+
material.set_vec2("direction", direction)
|
|
27
|
+
material.set_runtime_texture("screenTexture", source_rt.color_texture)
|
|
28
|
+
material.set_runtime_texture("depthTexture", PostProcessingEffect.depth_texture)
|
|
29
|
+
screen_quad.draw_with_material(material)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
|
|
34
|
+
def material
|
|
35
|
+
@material ||= begin
|
|
36
|
+
mat = Engine::Material.create(
|
|
37
|
+
shader: Engine::Shader.for(
|
|
38
|
+
'fullscreen_vertex.glsl',
|
|
39
|
+
'post_process/dof_blur_frag.glsl',
|
|
40
|
+
source: :engine
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
mat.set_float("focusDistance", @focus_distance)
|
|
44
|
+
mat.set_float("focusRange", @focus_range)
|
|
45
|
+
mat.set_float("blurAmount", @blur_amount)
|
|
46
|
+
mat.set_float("nearPlane", @near)
|
|
47
|
+
mat.set_float("farPlane", @far)
|
|
48
|
+
mat
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
module PostProcessingEffect
|
|
5
|
+
class << self
|
|
6
|
+
def add(effect)
|
|
7
|
+
effects << effect
|
|
8
|
+
effect
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def add_all(effects_array)
|
|
12
|
+
effects_array.each { |effect| add(effect) }
|
|
13
|
+
effects_array
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def remove(effect)
|
|
17
|
+
effects.delete(effect)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def clear
|
|
21
|
+
@effects = []
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def apply_all(render_texture_a, render_texture_b, screen_quad, normal_buffer = nil, start_index: 0)
|
|
25
|
+
@depth_texture = render_texture_a.depth_texture
|
|
26
|
+
@normal_texture = normal_buffer || render_texture_a.normal_texture
|
|
27
|
+
|
|
28
|
+
enabled_effects = effects.select(&:enabled)
|
|
29
|
+
textures = [render_texture_a, render_texture_b]
|
|
30
|
+
return textures[start_index] if enabled_effects.empty?
|
|
31
|
+
current_index = start_index
|
|
32
|
+
|
|
33
|
+
enabled_effects.each do |effect|
|
|
34
|
+
input_rt = textures[current_index]
|
|
35
|
+
output_rt = textures[1 - current_index]
|
|
36
|
+
|
|
37
|
+
stage_name = "pp:#{effect.class.name.split('::').last}"
|
|
38
|
+
result_rt = GpuTimer.measure(stage_name) do
|
|
39
|
+
effect.apply(input_rt, output_rt, screen_quad)
|
|
40
|
+
end
|
|
41
|
+
current_index = 1 - current_index if result_rt == output_rt
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
textures[current_index]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def depth_texture
|
|
48
|
+
@depth_texture
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def normal_texture
|
|
52
|
+
@normal_texture
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def effects
|
|
56
|
+
@effects ||= []
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Built-in effects
|
|
60
|
+
|
|
61
|
+
def tint(color: [1.0, 1.0, 1.0], intensity: 0.5)
|
|
62
|
+
TintEffect.new(color: color, intensity: intensity)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def depth_of_field(focus_distance: 10.0, focus_range: 50.0, blur_amount: 3.0, near: 0.1, far: 1000.0)
|
|
66
|
+
DepthOfFieldEffect.new(focus_distance: focus_distance, focus_range: focus_range, blur_amount: blur_amount, near: near, far: far)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def depth_debug
|
|
70
|
+
DepthDebugEffect.new
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def bloom(threshold: 0.7, intensity: 1.0, blur_passes: 2, blur_scale: 1.0)
|
|
74
|
+
BloomEffect.new(threshold: threshold, intensity: intensity, blur_passes: blur_passes, blur_scale: blur_scale)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def ssr(max_steps: 64, max_ray_distance: 50.0, thickness: 0.5, ray_offset: 2.0)
|
|
78
|
+
SSREffect.new(max_steps: max_steps, max_ray_distance: max_ray_distance, thickness: thickness, ray_offset: ray_offset)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def ssao(kernel_size: 16, radius: 0.5, bias: 0.025, power: 2.0, blur_size: 2, depth_threshold: 1000.0)
|
|
82
|
+
SSAOEffect.new(kernel_size: kernel_size, radius: radius, bias: bias, power: power, blur_size: blur_size, depth_threshold: depth_threshold)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
module SinglePassEffect
|
|
5
|
+
include Effect
|
|
6
|
+
|
|
7
|
+
attr_reader :material
|
|
8
|
+
|
|
9
|
+
def apply(input_rt, output_rt, screen_quad)
|
|
10
|
+
output_rt.bind
|
|
11
|
+
Engine::GL.Clear(Engine::GL::COLOR_BUFFER_BIT)
|
|
12
|
+
Engine::GL.Disable(Engine::GL::DEPTH_TEST)
|
|
13
|
+
|
|
14
|
+
material.set_runtime_texture("depthTexture", PostProcessingEffect.depth_texture)
|
|
15
|
+
screen_quad.draw(material, input_rt.color_texture)
|
|
16
|
+
output_rt
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|