ruby_rpg 0.0.4 → 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 +22 -0
- data/bin/build.bash +1 -1
- data/bin/import +11 -1
- 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/component.rb +2 -0
- data/lib/engine/components/audio_source.rb +6 -4
- data/lib/engine/components/direction_light.rb +83 -4
- data/lib/engine/components/orthographic_camera.rb +31 -25
- data/lib/engine/components/perspective_camera.rb +35 -12
- data/lib/engine/components/point_light.rb +61 -5
- 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 -0
- data/lib/engine/compute_texture.rb +13 -0
- data/lib/engine/debugging.rb +4 -4
- data/lib/engine/engine.rb +8 -12
- data/lib/engine/font.rb +29 -4
- data/lib/engine/game_object.rb +121 -49
- data/lib/engine/gl.rb +439 -0
- data/lib/engine/glfw.rb +151 -0
- data/lib/engine/input.rb +115 -7
- data/lib/engine/material.rb +146 -11
- data/lib/engine/matrix_helpers.rb +38 -0
- data/lib/engine/mesh.rb +41 -16
- 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/physics/components/rigidbody.rb +23 -20
- data/lib/engine/physics/components/sphere_collider.rb +13 -3
- data/lib/engine/physics/physics_resolver.rb +24 -12
- 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 +140 -61
- 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 +238 -6
- 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 +1 -1
- 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 +149 -25
- data/lib/engine/shaders/colour_frag.glsl +9 -1
- data/lib/engine/shaders/colour_vertex.glsl +12 -5
- 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} +3 -2
- 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 +28 -77
- data/lib/engine/shaders/mesh_vertex.glsl +5 -5
- 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/vertex_lit_frag.glsl +10 -66
- data/lib/engine/shaders/vertex_lit_vertex.glsl +1 -1
- 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/texture.rb +28 -19
- data/lib/engine/ui/rect.rb +16 -0
- data/lib/engine/window.rb +2 -2
- data/lib/ruby_rpg.rb +69 -9
- 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
- metadata +124 -466
- 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_renderer.rb +0 -101
- data/lib/engine/shaders/skybox_frag.glsl +0 -12
- /data/{glfw-3.3.9.bin.MACOS → vendor/glfw-3.3.9.bin.MACOS}/LICENSE.md +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.4.bin.WIN64 → vendor/glfw-3.4.bin.WIN64}/LICENSE.md +0 -0
- /data/{glfw-3.4.bin.WIN64 → vendor/glfw-3.4.bin.WIN64}/lib-static-ucrt/glfw3.dll +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
class CubemapShadowMapArray
|
|
5
|
+
attr_reader :size, :layer_count, :framebuffer, :depth_texture
|
|
6
|
+
|
|
7
|
+
def initialize(size: 1024, layer_count: 4)
|
|
8
|
+
@size = size
|
|
9
|
+
@layer_count = layer_count
|
|
10
|
+
create_framebuffer
|
|
11
|
+
create_depth_cubemap_array
|
|
12
|
+
check_framebuffer_complete
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def bind_face(layer_index, face_index)
|
|
16
|
+
raise "Layer index #{layer_index} out of bounds" if layer_index >= @layer_count
|
|
17
|
+
raise "Face index #{face_index} out of bounds" if face_index >= 6
|
|
18
|
+
|
|
19
|
+
Engine::GL.BindFramebuffer(Engine::GL::FRAMEBUFFER, @framebuffer)
|
|
20
|
+
# In a cubemap array, layers are: layer0_face0, layer0_face1, ..., layer0_face5, layer1_face0, ...
|
|
21
|
+
array_layer = layer_index * 6 + face_index
|
|
22
|
+
Engine::GL.FramebufferTextureLayer(Engine::GL::FRAMEBUFFER, Engine::GL::DEPTH_ATTACHMENT, @depth_texture, 0, array_layer)
|
|
23
|
+
Engine::GL.Viewport(0, 0, @size, @size)
|
|
24
|
+
Engine::GL.Clear(Engine::GL::DEPTH_BUFFER_BIT)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
def create_framebuffer
|
|
30
|
+
fbo_buf = ' ' * 4
|
|
31
|
+
Engine::GL.GenFramebuffers(1, fbo_buf)
|
|
32
|
+
@framebuffer = fbo_buf.unpack1('L')
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def create_depth_cubemap_array
|
|
36
|
+
tex_buf = ' ' * 4
|
|
37
|
+
Engine::GL.GenTextures(1, tex_buf)
|
|
38
|
+
@depth_texture = tex_buf.unpack1('L')
|
|
39
|
+
|
|
40
|
+
Engine::GL.BindTexture(Engine::GL::TEXTURE_CUBE_MAP_ARRAY, @depth_texture)
|
|
41
|
+
|
|
42
|
+
# For cubemap arrays, depth = layer_count * 6 (6 faces per cubemap)
|
|
43
|
+
Engine::GL.TexImage3D(
|
|
44
|
+
Engine::GL::TEXTURE_CUBE_MAP_ARRAY,
|
|
45
|
+
0,
|
|
46
|
+
Engine::GL::DEPTH_COMPONENT32F,
|
|
47
|
+
@size,
|
|
48
|
+
@size,
|
|
49
|
+
@layer_count * 6,
|
|
50
|
+
0,
|
|
51
|
+
Engine::GL::DEPTH_COMPONENT,
|
|
52
|
+
Engine::GL::FLOAT,
|
|
53
|
+
nil
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
Engine::GL.TexParameteri(Engine::GL::TEXTURE_CUBE_MAP_ARRAY, Engine::GL::TEXTURE_MIN_FILTER, Engine::GL::NEAREST)
|
|
57
|
+
Engine::GL.TexParameteri(Engine::GL::TEXTURE_CUBE_MAP_ARRAY, Engine::GL::TEXTURE_MAG_FILTER, Engine::GL::NEAREST)
|
|
58
|
+
Engine::GL.TexParameteri(Engine::GL::TEXTURE_CUBE_MAP_ARRAY, Engine::GL::TEXTURE_WRAP_S, Engine::GL::CLAMP_TO_EDGE)
|
|
59
|
+
Engine::GL.TexParameteri(Engine::GL::TEXTURE_CUBE_MAP_ARRAY, Engine::GL::TEXTURE_WRAP_T, Engine::GL::CLAMP_TO_EDGE)
|
|
60
|
+
Engine::GL.TexParameteri(Engine::GL::TEXTURE_CUBE_MAP_ARRAY, Engine::GL::TEXTURE_WRAP_R, Engine::GL::CLAMP_TO_EDGE)
|
|
61
|
+
|
|
62
|
+
Engine::GL.BindFramebuffer(Engine::GL::FRAMEBUFFER, @framebuffer)
|
|
63
|
+
# Attach first layer's first face for completeness check
|
|
64
|
+
Engine::GL.FramebufferTextureLayer(Engine::GL::FRAMEBUFFER, Engine::GL::DEPTH_ATTACHMENT, @depth_texture, 0, 0)
|
|
65
|
+
Engine::GL.DrawBuffer(Engine::GL::NONE)
|
|
66
|
+
Engine::GL.ReadBuffer(Engine::GL::NONE)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def check_framebuffer_complete
|
|
70
|
+
Engine::GL.BindFramebuffer(Engine::GL::FRAMEBUFFER, @framebuffer)
|
|
71
|
+
status = Engine::GL.CheckFramebufferStatus(Engine::GL::FRAMEBUFFER)
|
|
72
|
+
unless status == Engine::GL::FRAMEBUFFER_COMPLETE
|
|
73
|
+
raise "Cubemap shadow map array framebuffer not complete: #{status}"
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Rendering
|
|
4
|
+
class GpuTimer
|
|
5
|
+
class << self
|
|
6
|
+
def enabled?
|
|
7
|
+
@enabled ||= false
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def enable
|
|
11
|
+
@enabled = true
|
|
12
|
+
@frame_count = 0
|
|
13
|
+
@stages = []
|
|
14
|
+
@queries = {}
|
|
15
|
+
puts "GPU Profiler: ON"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def measure(stage)
|
|
19
|
+
unless enabled?
|
|
20
|
+
return yield
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
query_id = query_for(stage)
|
|
24
|
+
Engine::GL.BeginQuery(Engine::GL::TIME_ELAPSED, query_id)
|
|
25
|
+
result = yield
|
|
26
|
+
Engine::GL.EndQuery(Engine::GL::TIME_ELAPSED)
|
|
27
|
+
result
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def print_results
|
|
31
|
+
return unless enabled?
|
|
32
|
+
|
|
33
|
+
@frame_count += 1
|
|
34
|
+
return unless (@frame_count % 60) == 0
|
|
35
|
+
|
|
36
|
+
results = {}
|
|
37
|
+
@stages.each do |stage|
|
|
38
|
+
buf = ' ' * 8
|
|
39
|
+
Engine::GL.GetQueryObjectui64v(@queries[stage], Engine::GL::QUERY_RESULT, buf)
|
|
40
|
+
results[stage] = buf.unpack1('Q') / 1_000_000.0
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
total = results.values.sum
|
|
44
|
+
puts "\n=== GPU Timing ==="
|
|
45
|
+
@stages.each do |stage|
|
|
46
|
+
ms = results[stage]
|
|
47
|
+
pct = total > 0 ? (ms / total * 100).round(1) : 0
|
|
48
|
+
bar = "█" * (pct / 5).to_i
|
|
49
|
+
puts format("%-20s %6.2f ms (%5.1f%%) %s", stage, ms, pct, bar)
|
|
50
|
+
end
|
|
51
|
+
puts format("%-20s %6.2f ms", "TOTAL", total)
|
|
52
|
+
puts "===================="
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
private
|
|
56
|
+
|
|
57
|
+
def query_for(stage)
|
|
58
|
+
return @queries[stage] if @queries[stage]
|
|
59
|
+
|
|
60
|
+
buf = ' ' * 4
|
|
61
|
+
Engine::GL.GenQueries(1, buf)
|
|
62
|
+
@queries[stage] = buf.unpack1('L')
|
|
63
|
+
@stages << stage
|
|
64
|
+
@queries[stage]
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -4,45 +4,84 @@ module Rendering
|
|
|
4
4
|
class InstanceRenderer
|
|
5
5
|
attr_reader :mesh, :material
|
|
6
6
|
|
|
7
|
+
FLOATS_PER_MATRIX = 16
|
|
8
|
+
BYTES_PER_MATRIX = FLOATS_PER_MATRIX * Fiddle::SIZEOF_FLOAT
|
|
9
|
+
|
|
7
10
|
def initialize(mesh, material)
|
|
8
11
|
@mesh = mesh
|
|
9
12
|
@material = material
|
|
10
13
|
@mesh_renderers = []
|
|
11
|
-
@
|
|
14
|
+
@packed_data = String.new(encoding: Encoding::BINARY)
|
|
12
15
|
|
|
13
16
|
setup_vertex_attribute_buffer
|
|
14
17
|
setup_vertex_buffer
|
|
15
18
|
setup_index_buffer
|
|
16
19
|
generate_instance_vbo_buf
|
|
20
|
+
Engine::GL.BindVertexArray(0)
|
|
17
21
|
end
|
|
18
22
|
|
|
19
23
|
def add_instance(mesh_renderer)
|
|
20
24
|
@mesh_renderers << mesh_renderer
|
|
21
|
-
|
|
25
|
+
floats = mesh_renderer.game_object.model_matrix.to_a.flatten
|
|
26
|
+
@packed_data << floats.pack('F*')
|
|
22
27
|
end
|
|
23
28
|
|
|
24
29
|
def remove_instance(mesh_renderer)
|
|
25
30
|
index = @mesh_renderers.index(mesh_renderer)
|
|
26
31
|
@mesh_renderers.delete_at(index)
|
|
27
|
-
|
|
32
|
+
# Remove this instance's bytes from packed data
|
|
33
|
+
byte_offset = index * BYTES_PER_MATRIX
|
|
34
|
+
@packed_data[byte_offset, BYTES_PER_MATRIX] = ''
|
|
28
35
|
end
|
|
29
36
|
|
|
30
37
|
def update_instance(mesh_renderer)
|
|
31
38
|
index = @mesh_renderers.index(mesh_renderer)
|
|
32
|
-
|
|
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*')
|
|
33
42
|
end
|
|
34
43
|
|
|
35
44
|
def draw_all
|
|
36
45
|
set_material_per_frame_data
|
|
37
46
|
|
|
38
|
-
GL.BindVertexArray(@vao)
|
|
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)
|
|
39
80
|
update_vbo_buf
|
|
40
|
-
GL.BindBuffer(GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
41
|
-
GL.BindBuffer(GL::ARRAY_BUFFER, @instance_vbo)
|
|
81
|
+
Engine::GL.BindBuffer(Engine::GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
82
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
42
83
|
|
|
43
|
-
GL.DrawElementsInstanced(GL::TRIANGLES, mesh.index_data.length, GL::UNSIGNED_INT, 0, @mesh_renderers.count)
|
|
44
|
-
GL.BindVertexArray(0)
|
|
45
|
-
GL.BindBuffer(GL::ELEMENT_ARRAY_BUFFER, 0)
|
|
84
|
+
Engine::GL.DrawElementsInstanced(Engine::GL::TRIANGLES, mesh.index_data.length, Engine::GL::UNSIGNED_INT, 0, @mesh_renderers.count)
|
|
46
85
|
end
|
|
47
86
|
|
|
48
87
|
private
|
|
@@ -50,6 +89,7 @@ module Rendering
|
|
|
50
89
|
def set_material_per_frame_data
|
|
51
90
|
material.set_mat4("camera", Engine::Camera.instance.matrix)
|
|
52
91
|
material.set_vec3("cameraPos", Engine::Camera.instance.game_object.pos)
|
|
92
|
+
material.set_cubemap("skybox", nil)
|
|
53
93
|
|
|
54
94
|
update_light_data
|
|
55
95
|
material.update_shader
|
|
@@ -57,97 +97,136 @@ module Rendering
|
|
|
57
97
|
|
|
58
98
|
def update_light_data
|
|
59
99
|
Engine::Components::PointLight.point_lights.each_with_index do |light, i|
|
|
100
|
+
break if i >= 16
|
|
60
101
|
material.set_float("pointLights[#{i}].sqrRange", light.range * light.range)
|
|
61
|
-
material.set_vec3("pointLights[#{i}].position", light.
|
|
102
|
+
material.set_vec3("pointLights[#{i}].position", light.position)
|
|
62
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
|
|
63
110
|
end
|
|
111
|
+
# Set shared point shadow map cubemap array
|
|
112
|
+
material.set_cubemap_array("pointShadowMaps", RenderPipeline.point_shadow_map_array.depth_texture)
|
|
113
|
+
|
|
64
114
|
Engine::Components::DirectionLight.direction_lights.each_with_index do |light, i|
|
|
65
|
-
|
|
115
|
+
break if i >= 4
|
|
116
|
+
material.set_vec3("directionalLights[#{i}].direction", light.direction)
|
|
66
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
|
|
67
144
|
end
|
|
145
|
+
# Set shared spot shadow map array
|
|
146
|
+
material.set_texture_array("spotShadowMaps", RenderPipeline.spot_shadow_map_array.depth_texture)
|
|
68
147
|
end
|
|
69
148
|
|
|
70
149
|
def setup_index_buffer
|
|
71
150
|
indices = mesh.index_data
|
|
72
151
|
|
|
73
152
|
ebo_buf = ' ' * 4
|
|
74
|
-
GL.GenBuffers(1, ebo_buf)
|
|
153
|
+
Engine::GL.GenBuffers(1, ebo_buf)
|
|
75
154
|
@ebo = ebo_buf.unpack('L')[0]
|
|
76
|
-
GL.BindBuffer(GL::ELEMENT_ARRAY_BUFFER, @ebo)
|
|
77
|
-
GL.BufferData(
|
|
78
|
-
GL::ELEMENT_ARRAY_BUFFER, indices.length * Fiddle::SIZEOF_INT,
|
|
79
|
-
indices.pack('I*'), GL::STATIC_DRAW
|
|
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
|
|
80
159
|
)
|
|
81
160
|
end
|
|
82
161
|
|
|
83
162
|
def setup_vertex_attribute_buffer
|
|
84
163
|
vao_buf = ' ' * 4
|
|
85
|
-
GL.GenVertexArrays(1, vao_buf)
|
|
164
|
+
Engine::GL.GenVertexArrays(1, vao_buf)
|
|
86
165
|
@vao = vao_buf.unpack('L')[0]
|
|
87
|
-
GL.BindVertexArray(@vao)
|
|
166
|
+
Engine::GL.BindVertexArray(@vao)
|
|
88
167
|
end
|
|
89
168
|
|
|
90
169
|
def setup_vertex_buffer
|
|
91
170
|
vbo_buf = ' ' * 4
|
|
92
|
-
GL.GenBuffers(1, vbo_buf)
|
|
171
|
+
Engine::GL.GenBuffers(1, vbo_buf)
|
|
93
172
|
vbo = vbo_buf.unpack('L')[0]
|
|
94
173
|
points = mesh.vertex_data
|
|
95
174
|
|
|
96
|
-
GL.BindBuffer(GL::ARRAY_BUFFER, vbo)
|
|
97
|
-
GL.BufferData(
|
|
98
|
-
GL::ARRAY_BUFFER, @mesh.vertex_data.length * Fiddle::SIZEOF_FLOAT,
|
|
99
|
-
points.pack('F*'), GL::STATIC_DRAW
|
|
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
|
|
100
179
|
)
|
|
101
180
|
vertex_data_size = 20 * Fiddle::SIZEOF_FLOAT
|
|
102
181
|
|
|
103
|
-
GL.VertexAttribPointer(0, 3, GL::FLOAT, GL::FALSE, vertex_data_size, 0)
|
|
104
|
-
GL.VertexAttribPointer(1, 2, GL::FLOAT, GL::FALSE, vertex_data_size, 3 * Fiddle::SIZEOF_FLOAT)
|
|
105
|
-
GL.VertexAttribPointer(2, 3, GL::FLOAT, GL::FALSE, vertex_data_size, 5 * Fiddle::SIZEOF_FLOAT)
|
|
106
|
-
GL.VertexAttribPointer(3, 3, GL::FLOAT, GL::FALSE, vertex_data_size, 8 * Fiddle::SIZEOF_FLOAT)
|
|
107
|
-
GL.VertexAttribPointer(4, 3, GL::FLOAT, GL::FALSE, vertex_data_size, 11 * Fiddle::SIZEOF_FLOAT)
|
|
108
|
-
GL.VertexAttribPointer(5, 3, GL::FLOAT, GL::FALSE, vertex_data_size, 14 * Fiddle::SIZEOF_FLOAT)
|
|
109
|
-
GL.VertexAttribPointer(6, 3, GL::FLOAT, GL::FALSE, vertex_data_size, 17 * Fiddle::SIZEOF_FLOAT)
|
|
110
|
-
GL.EnableVertexAttribArray(0)
|
|
111
|
-
GL.EnableVertexAttribArray(1)
|
|
112
|
-
GL.EnableVertexAttribArray(2)
|
|
113
|
-
GL.EnableVertexAttribArray(3)
|
|
114
|
-
GL.EnableVertexAttribArray(4)
|
|
115
|
-
GL.EnableVertexAttribArray(5)
|
|
116
|
-
GL.EnableVertexAttribArray(6)
|
|
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)
|
|
117
196
|
end
|
|
118
197
|
|
|
119
198
|
def generate_instance_vbo_buf
|
|
120
199
|
instance_vbo_buf = ' ' * 4
|
|
121
|
-
GL.GenBuffers(1, instance_vbo_buf)
|
|
200
|
+
Engine::GL.GenBuffers(1, instance_vbo_buf)
|
|
122
201
|
@instance_vbo = instance_vbo_buf.unpack('L')[0]
|
|
123
|
-
update_vbo_buf
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def update_vbo_buf
|
|
127
|
-
vertex_data = @mesh_matrix_data
|
|
128
202
|
|
|
129
|
-
GL.BindBuffer(GL::ARRAY_BUFFER, @instance_vbo)
|
|
130
|
-
GL.BufferData(
|
|
131
|
-
GL::ARRAY_BUFFER, vertex_data.length * Fiddle::SIZEOF_FLOAT,
|
|
132
|
-
vertex_data.pack('F*'), GL::STATIC_DRAW
|
|
133
|
-
)
|
|
203
|
+
Engine::GL.BindBuffer(Engine::GL::ARRAY_BUFFER, @instance_vbo)
|
|
134
204
|
|
|
205
|
+
# Set up vertex attributes once (stored in VAO)
|
|
135
206
|
vec4_size = Fiddle::SIZEOF_FLOAT * 4
|
|
136
207
|
|
|
137
|
-
GL.EnableVertexAttribArray(7)
|
|
138
|
-
GL.EnableVertexAttribArray(8)
|
|
139
|
-
GL.EnableVertexAttribArray(9)
|
|
140
|
-
GL.EnableVertexAttribArray(10)
|
|
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)
|
|
141
217
|
|
|
142
|
-
GL.
|
|
143
|
-
GL.
|
|
144
|
-
GL.
|
|
145
|
-
GL.
|
|
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
|
|
146
223
|
|
|
147
|
-
|
|
148
|
-
GL.
|
|
149
|
-
GL.
|
|
150
|
-
|
|
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
|
+
)
|
|
151
230
|
end
|
|
152
231
|
end
|
|
153
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
|