mittsu 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build-workflow.yml +3 -38
- data/Gemfile +0 -4
- data/README.md +16 -130
- data/bin/console +0 -4
- data/lib/mittsu/cameras/cube_camera.rb +1 -1
- data/lib/mittsu/core/uniform.rb +23 -0
- data/lib/mittsu/core.rb +1 -0
- data/lib/mittsu/loaders/stl_loader.rb +186 -0
- data/lib/mittsu/loaders.rb +1 -0
- data/lib/mittsu/textures/render_target.rb +93 -0
- data/lib/mittsu/textures/render_target_cube.rb +8 -0
- data/lib/mittsu/textures/texture.rb +1 -1
- data/lib/mittsu/textures.rb +2 -0
- data/lib/mittsu/version.rb +1 -1
- data/lib/mittsu.rb +0 -1
- data/mittsu.gemspec +8 -12
- metadata +28 -199
- data/install-glfw.ps1 +0 -13
- data/lib/mittsu/renderers/generic_lib.rb +0 -125
- data/lib/mittsu/renderers/glfw_lib.rb +0 -64
- data/lib/mittsu/renderers/glfw_window.rb +0 -233
- data/lib/mittsu/renderers/opengl/core/buffer_geometry.rb +0 -11
- data/lib/mittsu/renderers/opengl/core/geometry.rb +0 -346
- data/lib/mittsu/renderers/opengl/core/object_3d.rb +0 -134
- data/lib/mittsu/renderers/opengl/lights/ambient_light.rb +0 -26
- data/lib/mittsu/renderers/opengl/lights/directional_light.rb +0 -35
- data/lib/mittsu/renderers/opengl/lights/hemisphere_light.rb +0 -39
- data/lib/mittsu/renderers/opengl/lights/light.rb +0 -55
- data/lib/mittsu/renderers/opengl/lights/point_light.rb +0 -36
- data/lib/mittsu/renderers/opengl/lights/spot_light.rb +0 -47
- data/lib/mittsu/renderers/opengl/materials/line_basic_material.rb +0 -16
- data/lib/mittsu/renderers/opengl/materials/material.rb +0 -274
- data/lib/mittsu/renderers/opengl/materials/mesh_basic_material.rb +0 -21
- data/lib/mittsu/renderers/opengl/materials/mesh_lambert_material.rb +0 -33
- data/lib/mittsu/renderers/opengl/materials/mesh_phong_material.rb +0 -44
- data/lib/mittsu/renderers/opengl/materials/opengl_material_basics.rb +0 -57
- data/lib/mittsu/renderers/opengl/materials/point_cloud_material.rb +0 -27
- data/lib/mittsu/renderers/opengl/materials/shader_material.rb +0 -11
- data/lib/mittsu/renderers/opengl/objects/group.rb +0 -9
- data/lib/mittsu/renderers/opengl/objects/line.rb +0 -45
- data/lib/mittsu/renderers/opengl/objects/mesh.rb +0 -70
- data/lib/mittsu/renderers/opengl/objects/point_cloud.rb +0 -39
- data/lib/mittsu/renderers/opengl/objects/sprite.rb +0 -12
- data/lib/mittsu/renderers/opengl/opengl_buffer.rb +0 -13
- data/lib/mittsu/renderers/opengl/opengl_debug.rb +0 -81
- data/lib/mittsu/renderers/opengl/opengl_default_target.rb +0 -50
- data/lib/mittsu/renderers/opengl/opengl_geometry_group.rb +0 -758
- data/lib/mittsu/renderers/opengl/opengl_geometry_like.rb +0 -132
- data/lib/mittsu/renderers/opengl/opengl_helper.rb +0 -161
- data/lib/mittsu/renderers/opengl/opengl_implementations.rb +0 -37
- data/lib/mittsu/renderers/opengl/opengl_lib.rb +0 -19
- data/lib/mittsu/renderers/opengl/opengl_light_renderer.rb +0 -43
- data/lib/mittsu/renderers/opengl/opengl_mittsu_params.rb +0 -53
- data/lib/mittsu/renderers/opengl/opengl_program.rb +0 -250
- data/lib/mittsu/renderers/opengl/opengl_shader.rb +0 -58
- data/lib/mittsu/renderers/opengl/opengl_state.rb +0 -205
- data/lib/mittsu/renderers/opengl/plugins/shadow_map_plugin.rb +0 -417
- data/lib/mittsu/renderers/opengl/plugins/sprite_fragment.glsl +0 -38
- data/lib/mittsu/renderers/opengl/plugins/sprite_plugin.rb +0 -250
- data/lib/mittsu/renderers/opengl/plugins/sprite_vertex.glsl +0 -31
- data/lib/mittsu/renderers/opengl/scenes/scene.rb +0 -9
- data/lib/mittsu/renderers/opengl/textures/compressed_texture.rb +0 -20
- data/lib/mittsu/renderers/opengl/textures/cube_texture.rb +0 -77
- data/lib/mittsu/renderers/opengl/textures/data_texture.rb +0 -21
- data/lib/mittsu/renderers/opengl/textures/texture.rb +0 -107
- data/lib/mittsu/renderers/opengl_render_target.rb +0 -201
- data/lib/mittsu/renderers/opengl_renderer.rb +0 -1028
- data/lib/mittsu/renderers/shaders/rbsl_loader.rb +0 -166
- data/lib/mittsu/renderers/shaders/shader_chunk/alphamap_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/alphamap_pars_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/alphatest_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/bumpmap_pars_fragment.glsl +0 -40
- data/lib/mittsu/renderers/shaders/shader_chunk/color_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/color_pars_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/color_pars_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/color_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/common.glsl +0 -60
- data/lib/mittsu/renderers/shaders/shader_chunk/default_vertex.glsl +0 -15
- data/lib/mittsu/renderers/shaders/shader_chunk/defaultnormal_vertex.glsl +0 -21
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_fragment.glsl +0 -62
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_fragment.glsl +0 -21
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_vertex.glsl +0 -7
- data/lib/mittsu/renderers/shaders/shader_chunk/envmap_vertex.glsl +0 -17
- data/lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl +0 -26
- data/lib/mittsu/renderers/shaders/shader_chunk/fog_pars_fragment.glsl +0 -15
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_fragment.glsl +0 -6
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/lightmap_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_pars_vertex.glsl +0 -43
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_vertex.glsl +0 -196
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_fragment.glsl +0 -243
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_fragment.glsl +0 -58
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/lights_phong_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/linear_to_gamma_fragment.glsl +0 -2
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_fragment.glsl +0 -12
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_vertex.glsl +0 -11
- data/lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_vertex.glsl +0 -15
- data/lib/mittsu/renderers/shaders/shader_chunk/map_fragment.glsl +0 -9
- data/lib/mittsu/renderers/shaders/shader_chunk/map_pars_fragment.glsl +0 -11
- data/lib/mittsu/renderers/shaders/shader_chunk/map_pars_vertex.glsl +0 -6
- data/lib/mittsu/renderers/shaders/shader_chunk/map_particle_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/map_particle_pars_fragment.glsl +0 -6
- data/lib/mittsu/renderers/shaders/shader_chunk/map_vertex.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/morphnormal_vertex.glsl +0 -12
- data/lib/mittsu/renderers/shaders/shader_chunk/morphtarget_pars_vertex.glsl +0 -13
- data/lib/mittsu/renderers/shaders/shader_chunk/morphtarget_vertex.glsl +0 -20
- data/lib/mittsu/renderers/shaders/shader_chunk/normalmap_pars_fragment.glsl +0 -27
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_fragment.glsl +0 -216
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_fragment.glsl +0 -19
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_vertex.glsl +0 -6
- data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_vertex.glsl +0 -9
- data/lib/mittsu/renderers/shaders/shader_chunk/skinbase_vertex.glsl +0 -8
- data/lib/mittsu/renderers/shaders/shader_chunk/skinning_pars_vertex.glsl +0 -47
- data/lib/mittsu/renderers/shaders/shader_chunk/skinning_vertex.glsl +0 -20
- data/lib/mittsu/renderers/shaders/shader_chunk/skinnormal_vertex.glsl +0 -20
- data/lib/mittsu/renderers/shaders/shader_chunk/specularmap_fragment.glsl +0 -12
- data/lib/mittsu/renderers/shaders/shader_chunk/specularmap_pars_fragment.glsl +0 -5
- data/lib/mittsu/renderers/shaders/shader_chunk/worldpos_vertex.glsl +0 -17
- data/lib/mittsu/renderers/shaders/shader_chunk.rb +0 -9
- data/lib/mittsu/renderers/shaders/shader_lib/basic/basic_fragment.rbsl +0 -37
- data/lib/mittsu/renderers/shaders/shader_lib/basic/basic_uniforms.rbslu +0 -3
- data/lib/mittsu/renderers/shaders/shader_lib/basic/basic_vertex.rbsl +0 -33
- data/lib/mittsu/renderers/shaders/shader_lib/cube/cube_fragment.rbsl +0 -12
- data/lib/mittsu/renderers/shaders/shader_lib/cube/cube_uniforms.rbslu +0 -2
- data/lib/mittsu/renderers/shaders/shader_lib/cube/cube_vertex.rbsl +0 -12
- data/lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_fragment.rbsl +0 -26
- data/lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_uniforms.rbslu +0 -0
- data/lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_vertex.rbsl +0 -12
- data/lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_fragment.rbsl +0 -56
- data/lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_uniforms.rbslu +0 -7
- data/lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_vertex.rbsl +0 -37
- data/lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl +0 -27
- data/lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_uniforms.rbslu +0 -2
- data/lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_vertex.rbsl +0 -25
- data/lib/mittsu/renderers/shaders/shader_lib/phong/phong_fragment.rbsl +0 -45
- data/lib/mittsu/renderers/shaders/shader_lib/phong/phong_uniforms.rbslu +0 -11
- data/lib/mittsu/renderers/shaders/shader_lib/phong/phong_vertex.rbsl +0 -43
- data/lib/mittsu/renderers/shaders/shader_lib.rb +0 -43
- data/lib/mittsu/renderers/shaders/shader_templates/fragment.glsl.erb +0 -105
- data/lib/mittsu/renderers/shaders/shader_templates/vertex.glsl.erb +0 -143
- data/lib/mittsu/renderers/shaders/uniforms_lib.rb +0 -106
- data/lib/mittsu/renderers/shaders/uniforms_utils.rb +0 -31
- data/lib/mittsu/renderers.rb +0 -1
data/mittsu.gemspec
CHANGED
@@ -10,28 +10,24 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["danini@hey.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{3D Graphics Library for Ruby}
|
13
|
-
spec.description = %q{Mittsu
|
13
|
+
spec.description = %q{Mittsu is a 3D Graphics Library for Ruby, based heavily on Three.js}
|
14
14
|
spec.homepage = "https://github.com/danini-the-panini/mittsu"
|
15
15
|
spec.license = "MIT"
|
16
16
|
spec.metadata = {
|
17
17
|
"bug_tracker" => "https://github.com/danini-the-panini/mittsu/issues"
|
18
18
|
}
|
19
19
|
|
20
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{(^(test
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{(^(test)/|\.sh$)}) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.required_ruby_version = '>= 2.
|
24
|
-
spec.requirements << 'OpenGL 3.3+ capable hardware and drivers'
|
23
|
+
spec.required_ruby_version = '>= 2.6.0'
|
25
24
|
|
26
|
-
spec.add_runtime_dependency 'opengl-bindings'
|
27
|
-
spec.add_runtime_dependency 'ffi'
|
28
25
|
spec.add_runtime_dependency 'chunky_png'
|
29
26
|
|
30
|
-
spec.add_development_dependency
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency 'minitest'
|
33
|
-
spec.add_development_dependency 'minitest-reporters'
|
34
|
-
spec.add_development_dependency '
|
35
|
-
spec.add_development_dependency 'benchmark-ips'
|
27
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
28
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
29
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
30
|
+
spec.add_development_dependency 'minitest-reporters', '~> 1.7'
|
31
|
+
spec.add_development_dependency 'benchmark-ips', '~> 2.14'
|
36
32
|
spec.add_development_dependency 'simplecov', '0.17.1'
|
37
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mittsu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danielle Smith
|
@@ -10,34 +10,6 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: opengl-bindings
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: ffi
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: chunky_png
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,86 +28,72 @@ dependencies:
|
|
56
28
|
name: bundler
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
58
30
|
requirements:
|
59
|
-
- - "
|
31
|
+
- - "~>"
|
60
32
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
33
|
+
version: '2.0'
|
62
34
|
type: :development
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
|
-
- - "
|
38
|
+
- - "~>"
|
67
39
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
40
|
+
version: '2.0'
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: rake
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
|
-
- - "
|
45
|
+
- - "~>"
|
74
46
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
47
|
+
version: '13.0'
|
76
48
|
type: :development
|
77
49
|
prerelease: false
|
78
50
|
version_requirements: !ruby/object:Gem::Requirement
|
79
51
|
requirements:
|
80
|
-
- - "
|
52
|
+
- - "~>"
|
81
53
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
54
|
+
version: '13.0'
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
56
|
name: minitest
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
86
58
|
requirements:
|
87
|
-
- - "
|
59
|
+
- - "~>"
|
88
60
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
61
|
+
version: '5.0'
|
90
62
|
type: :development
|
91
63
|
prerelease: false
|
92
64
|
version_requirements: !ruby/object:Gem::Requirement
|
93
65
|
requirements:
|
94
|
-
- - "
|
66
|
+
- - "~>"
|
95
67
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
68
|
+
version: '5.0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
70
|
name: minitest-reporters
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
100
72
|
requirements:
|
101
|
-
- - "
|
73
|
+
- - "~>"
|
102
74
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
75
|
+
version: '1.7'
|
104
76
|
type: :development
|
105
77
|
prerelease: false
|
106
78
|
version_requirements: !ruby/object:Gem::Requirement
|
107
79
|
requirements:
|
108
|
-
- - "
|
80
|
+
- - "~>"
|
109
81
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: pry
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
82
|
+
version: '1.7'
|
125
83
|
- !ruby/object:Gem::Dependency
|
126
84
|
name: benchmark-ips
|
127
85
|
requirement: !ruby/object:Gem::Requirement
|
128
86
|
requirements:
|
129
|
-
- - "
|
87
|
+
- - "~>"
|
130
88
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
89
|
+
version: '2.14'
|
132
90
|
type: :development
|
133
91
|
prerelease: false
|
134
92
|
version_requirements: !ruby/object:Gem::Requirement
|
135
93
|
requirements:
|
136
|
-
- - "
|
94
|
+
- - "~>"
|
137
95
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
96
|
+
version: '2.14'
|
139
97
|
- !ruby/object:Gem::Dependency
|
140
98
|
name: simplecov
|
141
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,10 +108,7 @@ dependencies:
|
|
150
108
|
- - '='
|
151
109
|
- !ruby/object:Gem::Version
|
152
110
|
version: 0.17.1
|
153
|
-
description: Mittsu
|
154
|
-
and is based heavily off of THREE.js. No more weird pointers and wondering about
|
155
|
-
the difference between a VAO and a VBO (besides the letter). Simply think of something
|
156
|
-
awesome and make it!
|
111
|
+
description: Mittsu is a 3D Graphics Library for Ruby, based heavily on Three.js
|
157
112
|
email:
|
158
113
|
- danini@hey.com
|
159
114
|
executables: []
|
@@ -171,7 +126,6 @@ files:
|
|
171
126
|
- Rakefile
|
172
127
|
- bin/console
|
173
128
|
- bin/setup
|
174
|
-
- install-glfw.ps1
|
175
129
|
- lib/mittsu.rb
|
176
130
|
- lib/mittsu/cameras.rb
|
177
131
|
- lib/mittsu/cameras/camera.rb
|
@@ -190,6 +144,7 @@ files:
|
|
190
144
|
- lib/mittsu/core/hash_array.rb
|
191
145
|
- lib/mittsu/core/object_3d.rb
|
192
146
|
- lib/mittsu/core/raycaster.rb
|
147
|
+
- lib/mittsu/core/uniform.rb
|
193
148
|
- lib/mittsu/extras.rb
|
194
149
|
- lib/mittsu/extras/geometries.rb
|
195
150
|
- lib/mittsu/extras/geometries/box_geometry.rb
|
@@ -231,6 +186,7 @@ files:
|
|
231
186
|
- lib/mittsu/loaders/mtl_loader.rb
|
232
187
|
- lib/mittsu/loaders/obj_loader.rb
|
233
188
|
- lib/mittsu/loaders/obj_mtl_loader.rb
|
189
|
+
- lib/mittsu/loaders/stl_loader.rb
|
234
190
|
- lib/mittsu/materials.rb
|
235
191
|
- lib/mittsu/materials/line_basic_material.rb
|
236
192
|
- lib/mittsu/materials/material.rb
|
@@ -267,140 +223,14 @@ files:
|
|
267
223
|
- lib/mittsu/objects/mesh.rb
|
268
224
|
- lib/mittsu/objects/point_cloud.rb
|
269
225
|
- lib/mittsu/objects/sprite.rb
|
270
|
-
- lib/mittsu/renderers.rb
|
271
|
-
- lib/mittsu/renderers/generic_lib.rb
|
272
|
-
- lib/mittsu/renderers/glfw_lib.rb
|
273
|
-
- lib/mittsu/renderers/glfw_window.rb
|
274
|
-
- lib/mittsu/renderers/opengl/core/buffer_geometry.rb
|
275
|
-
- lib/mittsu/renderers/opengl/core/geometry.rb
|
276
|
-
- lib/mittsu/renderers/opengl/core/object_3d.rb
|
277
|
-
- lib/mittsu/renderers/opengl/lights/ambient_light.rb
|
278
|
-
- lib/mittsu/renderers/opengl/lights/directional_light.rb
|
279
|
-
- lib/mittsu/renderers/opengl/lights/hemisphere_light.rb
|
280
|
-
- lib/mittsu/renderers/opengl/lights/light.rb
|
281
|
-
- lib/mittsu/renderers/opengl/lights/point_light.rb
|
282
|
-
- lib/mittsu/renderers/opengl/lights/spot_light.rb
|
283
|
-
- lib/mittsu/renderers/opengl/materials/line_basic_material.rb
|
284
|
-
- lib/mittsu/renderers/opengl/materials/material.rb
|
285
|
-
- lib/mittsu/renderers/opengl/materials/mesh_basic_material.rb
|
286
|
-
- lib/mittsu/renderers/opengl/materials/mesh_lambert_material.rb
|
287
|
-
- lib/mittsu/renderers/opengl/materials/mesh_phong_material.rb
|
288
|
-
- lib/mittsu/renderers/opengl/materials/opengl_material_basics.rb
|
289
|
-
- lib/mittsu/renderers/opengl/materials/point_cloud_material.rb
|
290
|
-
- lib/mittsu/renderers/opengl/materials/shader_material.rb
|
291
|
-
- lib/mittsu/renderers/opengl/objects/group.rb
|
292
|
-
- lib/mittsu/renderers/opengl/objects/line.rb
|
293
|
-
- lib/mittsu/renderers/opengl/objects/mesh.rb
|
294
|
-
- lib/mittsu/renderers/opengl/objects/point_cloud.rb
|
295
|
-
- lib/mittsu/renderers/opengl/objects/sprite.rb
|
296
|
-
- lib/mittsu/renderers/opengl/opengl_buffer.rb
|
297
|
-
- lib/mittsu/renderers/opengl/opengl_debug.rb
|
298
|
-
- lib/mittsu/renderers/opengl/opengl_default_target.rb
|
299
|
-
- lib/mittsu/renderers/opengl/opengl_geometry_group.rb
|
300
|
-
- lib/mittsu/renderers/opengl/opengl_geometry_like.rb
|
301
|
-
- lib/mittsu/renderers/opengl/opengl_helper.rb
|
302
|
-
- lib/mittsu/renderers/opengl/opengl_implementations.rb
|
303
|
-
- lib/mittsu/renderers/opengl/opengl_lib.rb
|
304
|
-
- lib/mittsu/renderers/opengl/opengl_light_renderer.rb
|
305
|
-
- lib/mittsu/renderers/opengl/opengl_mittsu_params.rb
|
306
|
-
- lib/mittsu/renderers/opengl/opengl_program.rb
|
307
|
-
- lib/mittsu/renderers/opengl/opengl_shader.rb
|
308
|
-
- lib/mittsu/renderers/opengl/opengl_state.rb
|
309
|
-
- lib/mittsu/renderers/opengl/plugins/shadow_map_plugin.rb
|
310
|
-
- lib/mittsu/renderers/opengl/plugins/sprite_fragment.glsl
|
311
|
-
- lib/mittsu/renderers/opengl/plugins/sprite_plugin.rb
|
312
|
-
- lib/mittsu/renderers/opengl/plugins/sprite_vertex.glsl
|
313
|
-
- lib/mittsu/renderers/opengl/scenes/scene.rb
|
314
|
-
- lib/mittsu/renderers/opengl/textures/compressed_texture.rb
|
315
|
-
- lib/mittsu/renderers/opengl/textures/cube_texture.rb
|
316
|
-
- lib/mittsu/renderers/opengl/textures/data_texture.rb
|
317
|
-
- lib/mittsu/renderers/opengl/textures/texture.rb
|
318
|
-
- lib/mittsu/renderers/opengl_render_target.rb
|
319
|
-
- lib/mittsu/renderers/opengl_renderer.rb
|
320
|
-
- lib/mittsu/renderers/shaders/rbsl_loader.rb
|
321
|
-
- lib/mittsu/renderers/shaders/shader_chunk.rb
|
322
|
-
- lib/mittsu/renderers/shaders/shader_chunk/alphamap_fragment.glsl
|
323
|
-
- lib/mittsu/renderers/shaders/shader_chunk/alphamap_pars_fragment.glsl
|
324
|
-
- lib/mittsu/renderers/shaders/shader_chunk/alphatest_fragment.glsl
|
325
|
-
- lib/mittsu/renderers/shaders/shader_chunk/bumpmap_pars_fragment.glsl
|
326
|
-
- lib/mittsu/renderers/shaders/shader_chunk/color_fragment.glsl
|
327
|
-
- lib/mittsu/renderers/shaders/shader_chunk/color_pars_fragment.glsl
|
328
|
-
- lib/mittsu/renderers/shaders/shader_chunk/color_pars_vertex.glsl
|
329
|
-
- lib/mittsu/renderers/shaders/shader_chunk/color_vertex.glsl
|
330
|
-
- lib/mittsu/renderers/shaders/shader_chunk/common.glsl
|
331
|
-
- lib/mittsu/renderers/shaders/shader_chunk/default_vertex.glsl
|
332
|
-
- lib/mittsu/renderers/shaders/shader_chunk/defaultnormal_vertex.glsl
|
333
|
-
- lib/mittsu/renderers/shaders/shader_chunk/envmap_fragment.glsl
|
334
|
-
- lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_fragment.glsl
|
335
|
-
- lib/mittsu/renderers/shaders/shader_chunk/envmap_pars_vertex.glsl
|
336
|
-
- lib/mittsu/renderers/shaders/shader_chunk/envmap_vertex.glsl
|
337
|
-
- lib/mittsu/renderers/shaders/shader_chunk/fog_fragment.glsl
|
338
|
-
- lib/mittsu/renderers/shaders/shader_chunk/fog_pars_fragment.glsl
|
339
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_fragment.glsl
|
340
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_fragment.glsl
|
341
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_pars_vertex.glsl
|
342
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lightmap_vertex.glsl
|
343
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_pars_vertex.glsl
|
344
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lights_lambert_vertex.glsl
|
345
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_fragment.glsl
|
346
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_fragment.glsl
|
347
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_pars_vertex.glsl
|
348
|
-
- lib/mittsu/renderers/shaders/shader_chunk/lights_phong_vertex.glsl
|
349
|
-
- lib/mittsu/renderers/shaders/shader_chunk/linear_to_gamma_fragment.glsl
|
350
|
-
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_fragment.glsl
|
351
|
-
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_fragment.glsl
|
352
|
-
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_pars_vertex.glsl
|
353
|
-
- lib/mittsu/renderers/shaders/shader_chunk/logdepthbuf_vertex.glsl
|
354
|
-
- lib/mittsu/renderers/shaders/shader_chunk/map_fragment.glsl
|
355
|
-
- lib/mittsu/renderers/shaders/shader_chunk/map_pars_fragment.glsl
|
356
|
-
- lib/mittsu/renderers/shaders/shader_chunk/map_pars_vertex.glsl
|
357
|
-
- lib/mittsu/renderers/shaders/shader_chunk/map_particle_fragment.glsl
|
358
|
-
- lib/mittsu/renderers/shaders/shader_chunk/map_particle_pars_fragment.glsl
|
359
|
-
- lib/mittsu/renderers/shaders/shader_chunk/map_vertex.glsl
|
360
|
-
- lib/mittsu/renderers/shaders/shader_chunk/morphnormal_vertex.glsl
|
361
|
-
- lib/mittsu/renderers/shaders/shader_chunk/morphtarget_pars_vertex.glsl
|
362
|
-
- lib/mittsu/renderers/shaders/shader_chunk/morphtarget_vertex.glsl
|
363
|
-
- lib/mittsu/renderers/shaders/shader_chunk/normalmap_pars_fragment.glsl
|
364
|
-
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_fragment.glsl
|
365
|
-
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_fragment.glsl
|
366
|
-
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_pars_vertex.glsl
|
367
|
-
- lib/mittsu/renderers/shaders/shader_chunk/shadowmap_vertex.glsl
|
368
|
-
- lib/mittsu/renderers/shaders/shader_chunk/skinbase_vertex.glsl
|
369
|
-
- lib/mittsu/renderers/shaders/shader_chunk/skinning_pars_vertex.glsl
|
370
|
-
- lib/mittsu/renderers/shaders/shader_chunk/skinning_vertex.glsl
|
371
|
-
- lib/mittsu/renderers/shaders/shader_chunk/skinnormal_vertex.glsl
|
372
|
-
- lib/mittsu/renderers/shaders/shader_chunk/specularmap_fragment.glsl
|
373
|
-
- lib/mittsu/renderers/shaders/shader_chunk/specularmap_pars_fragment.glsl
|
374
|
-
- lib/mittsu/renderers/shaders/shader_chunk/worldpos_vertex.glsl
|
375
|
-
- lib/mittsu/renderers/shaders/shader_lib.rb
|
376
|
-
- lib/mittsu/renderers/shaders/shader_lib/basic/basic_fragment.rbsl
|
377
|
-
- lib/mittsu/renderers/shaders/shader_lib/basic/basic_uniforms.rbslu
|
378
|
-
- lib/mittsu/renderers/shaders/shader_lib/basic/basic_vertex.rbsl
|
379
|
-
- lib/mittsu/renderers/shaders/shader_lib/cube/cube_fragment.rbsl
|
380
|
-
- lib/mittsu/renderers/shaders/shader_lib/cube/cube_uniforms.rbslu
|
381
|
-
- lib/mittsu/renderers/shaders/shader_lib/cube/cube_vertex.rbsl
|
382
|
-
- lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_fragment.rbsl
|
383
|
-
- lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_uniforms.rbslu
|
384
|
-
- lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_vertex.rbsl
|
385
|
-
- lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_fragment.rbsl
|
386
|
-
- lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_uniforms.rbslu
|
387
|
-
- lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_vertex.rbsl
|
388
|
-
- lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_fragment.rbsl
|
389
|
-
- lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_uniforms.rbslu
|
390
|
-
- lib/mittsu/renderers/shaders/shader_lib/particle_basic/particle_basic_vertex.rbsl
|
391
|
-
- lib/mittsu/renderers/shaders/shader_lib/phong/phong_fragment.rbsl
|
392
|
-
- lib/mittsu/renderers/shaders/shader_lib/phong/phong_uniforms.rbslu
|
393
|
-
- lib/mittsu/renderers/shaders/shader_lib/phong/phong_vertex.rbsl
|
394
|
-
- lib/mittsu/renderers/shaders/shader_templates/fragment.glsl.erb
|
395
|
-
- lib/mittsu/renderers/shaders/shader_templates/vertex.glsl.erb
|
396
|
-
- lib/mittsu/renderers/shaders/uniforms_lib.rb
|
397
|
-
- lib/mittsu/renderers/shaders/uniforms_utils.rb
|
398
226
|
- lib/mittsu/scenes.rb
|
399
227
|
- lib/mittsu/scenes/scene.rb
|
400
228
|
- lib/mittsu/textures.rb
|
401
229
|
- lib/mittsu/textures/compressed_texture.rb
|
402
230
|
- lib/mittsu/textures/cube_texture.rb
|
403
231
|
- lib/mittsu/textures/data_texture.rb
|
232
|
+
- lib/mittsu/textures/render_target.rb
|
233
|
+
- lib/mittsu/textures/render_target_cube.rb
|
404
234
|
- lib/mittsu/textures/texture.rb
|
405
235
|
- lib/mittsu/textures/video_texture.rb
|
406
236
|
- lib/mittsu/utils.rb
|
@@ -419,14 +249,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
419
249
|
requirements:
|
420
250
|
- - ">="
|
421
251
|
- !ruby/object:Gem::Version
|
422
|
-
version: 2.
|
252
|
+
version: 2.6.0
|
423
253
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
424
254
|
requirements:
|
425
255
|
- - ">="
|
426
256
|
- !ruby/object:Gem::Version
|
427
257
|
version: '0'
|
428
|
-
requirements:
|
429
|
-
- OpenGL 3.3+ capable hardware and drivers
|
258
|
+
requirements: []
|
430
259
|
rubygems_version: 3.5.23
|
431
260
|
signing_key:
|
432
261
|
specification_version: 4
|
data/install-glfw.ps1
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
$glfwversion="3.3.1"
|
2
|
-
|
3
|
-
Invoke-WebRequest "https://github.com/glfw/glfw/releases/download/$glfwversion/glfw-$glfwversion.bin.WIN32.zip" -OutFile "$pwd\glfw-$glfwversion.bin.WIN32.zip"
|
4
|
-
|
5
|
-
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
6
|
-
function Unzip
|
7
|
-
{
|
8
|
-
param([string]$zipfile, [string]$outpath)
|
9
|
-
|
10
|
-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
11
|
-
}
|
12
|
-
|
13
|
-
Unzip "$pwd\glfw-$glfwversion.bin.WIN32.zip" "$pwd"
|
@@ -1,125 +0,0 @@
|
|
1
|
-
require 'open3'
|
2
|
-
|
3
|
-
module Mittsu
|
4
|
-
module GenericLib
|
5
|
-
def discover
|
6
|
-
case OpenGL.get_platform
|
7
|
-
when :OPENGL_PLATFORM_WINDOWS
|
8
|
-
self::Windows.new
|
9
|
-
when :OPENGL_PLATFORM_MACOSX
|
10
|
-
self::MacOS.new
|
11
|
-
when :OPENGL_PLATFORM_LINUX
|
12
|
-
self::Linux.new
|
13
|
-
else
|
14
|
-
warn "WARNING: Unsupported platform: #{OpenGL.get_platform}"
|
15
|
-
Base.new
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
class Base
|
20
|
-
def path; nil; end
|
21
|
-
def file; nil; end
|
22
|
-
end
|
23
|
-
|
24
|
-
class Linux < Base
|
25
|
-
def path
|
26
|
-
return nil if file_path.nil?
|
27
|
-
File.dirname file_path
|
28
|
-
end
|
29
|
-
|
30
|
-
def file
|
31
|
-
return nil if file_path.nil?
|
32
|
-
File.basename file_path
|
33
|
-
end
|
34
|
-
|
35
|
-
class << self
|
36
|
-
def kernel_module_in_use
|
37
|
-
lspci_line, stderr, _status = Open3.capture3("lspci -nnk | grep -i vga -A3 | grep 'in use'")
|
38
|
-
puts stderr if DEBUG
|
39
|
-
/in use:\s*(\S+)/ =~ lspci_line && $1
|
40
|
-
rescue
|
41
|
-
''
|
42
|
-
end
|
43
|
-
|
44
|
-
def libgl_paths
|
45
|
-
Dir.glob('/usr/lib*/**/libGL.so*')
|
46
|
-
rescue
|
47
|
-
[]
|
48
|
-
end
|
49
|
-
|
50
|
-
def sixtyfour_bits?
|
51
|
-
1.size == 8
|
52
|
-
end
|
53
|
-
|
54
|
-
def ldconfig
|
55
|
-
`ldconfig -p | grep 'libGL\\.so'`.lines
|
56
|
-
rescue
|
57
|
-
[]
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
private
|
62
|
-
def file_path
|
63
|
-
@_file_path ||= begin
|
64
|
-
ldconfig_lib || driver_specific_lib || sixtyfour_bit_lib || fallback_lib || give_up
|
65
|
-
end.tap do |result|
|
66
|
-
print_debug_info(result) if DEBUG
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
def ldconfig_lib
|
71
|
-
return nil if ldconfig.empty?
|
72
|
-
@_debug = { source: 'ldconfig', info: ldconfig.inspect } if DEBUG
|
73
|
-
ldconfig_for_arch = ldconfig.reject { |lib| @loader.sixtyfour_bits? ^ ldconfig_64?(lib) }
|
74
|
-
ldconfig_for_arch.first.match(/=> (\/.*)$/)[1]
|
75
|
-
end
|
76
|
-
|
77
|
-
def ldconfig_64?(lib)
|
78
|
-
lib =~ /\([^\)]*64[^\)]*\) =>/
|
79
|
-
end
|
80
|
-
|
81
|
-
def driver_specific_lib
|
82
|
-
return nil if libs.empty?
|
83
|
-
@_debug = { source: 'driver', info: kernel_module } if DEBUG
|
84
|
-
libs.select { |lib| lib =~ /nvidia/ }.first if kernel_module =~ /nvidia/
|
85
|
-
end
|
86
|
-
|
87
|
-
def sixtyfour_bit_lib
|
88
|
-
return nil if libs.empty?
|
89
|
-
sixtyfour_bit_libs = libs.select { |lib| lib =~ /64/ }
|
90
|
-
@_debug = { source: '64', info: sixtyfour_bit_libs.inspect } if DEBUG
|
91
|
-
sixtyfour_bit_libs.first if @loader.sixtyfour_bits?
|
92
|
-
end
|
93
|
-
|
94
|
-
def fallback_lib
|
95
|
-
return nil if libs.empty?
|
96
|
-
@_debug = { source: 'fallback', info: libs.inspect } if DEBUG
|
97
|
-
libs.first
|
98
|
-
end
|
99
|
-
|
100
|
-
def give_up
|
101
|
-
@_debug = { source: 'none', info: nil } if DEBUG
|
102
|
-
nil
|
103
|
-
end
|
104
|
-
|
105
|
-
def kernel_module
|
106
|
-
@_kernel_module ||= @loader.kernel_module_in_use
|
107
|
-
end
|
108
|
-
|
109
|
-
def libs
|
110
|
-
@_libs ||= @loader.libgl_paths.sort_by(&:length)
|
111
|
-
end
|
112
|
-
|
113
|
-
def ldconfig
|
114
|
-
@_ldconfig ||= @loader.ldconfig
|
115
|
-
end
|
116
|
-
|
117
|
-
def print_debug_info(result)
|
118
|
-
puts "Loading lib path: #{result.inspect}"
|
119
|
-
puts "Source: #{@_debug[:source]}"
|
120
|
-
puts "Info: #{@_debug[:info]}"
|
121
|
-
puts "64-bit? #{@loader.sixtyfour_bits?}"
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
require 'mittsu/renderers/generic_lib'
|
2
|
-
|
3
|
-
module Mittsu
|
4
|
-
module GLFWLib
|
5
|
-
extend GenericLib
|
6
|
-
|
7
|
-
class Linux < GenericLib::Linux
|
8
|
-
def initialize(loader = Linux)
|
9
|
-
@loader = loader
|
10
|
-
end
|
11
|
-
|
12
|
-
class << self
|
13
|
-
def libgl_paths
|
14
|
-
Dir.glob('/usr/lib*/**/libglfw*.so*')
|
15
|
-
rescue
|
16
|
-
[]
|
17
|
-
end
|
18
|
-
|
19
|
-
def ldconfig
|
20
|
-
out, stderr, _status = Open3.capture3("ldconfig -p | grep 'libglfw3\\?\\.so'")
|
21
|
-
puts stderr if DEBUG
|
22
|
-
out.lines
|
23
|
-
rescue
|
24
|
-
[]
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class Windows < GenericLib::Base
|
30
|
-
def file
|
31
|
-
'glfw3.dll'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
class MacOS < GenericLib::Base
|
36
|
-
SEARCH_GLOBS = ['/usr/local/lib/**',
|
37
|
-
'/usr/lib/**',
|
38
|
-
'/opt/homebrew/**']
|
39
|
-
|
40
|
-
def path
|
41
|
-
File.dirname(match.to_s)
|
42
|
-
end
|
43
|
-
|
44
|
-
def file
|
45
|
-
File.basename(match.to_s)
|
46
|
-
end
|
47
|
-
|
48
|
-
private
|
49
|
-
|
50
|
-
def match
|
51
|
-
@match ||= find_match
|
52
|
-
end
|
53
|
-
|
54
|
-
def find_match
|
55
|
-
SEARCH_GLOBS.each do |glob|
|
56
|
-
matches = Dir.glob("#{glob}/libglfw*.dylib")
|
57
|
-
next if matches.empty?
|
58
|
-
|
59
|
-
return matches.find { |m| m.end_with?('libglfw3.dylib') || m.end_with?('libglfw.3.dylib') } || matches.first
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|