mittsu 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/README.md +1 -1
  4. data/lib/mittsu/cameras/orthographic_camera.rb +13 -0
  5. data/lib/mittsu/cameras/perspective_camera.rb +11 -0
  6. data/lib/mittsu/core/geometry.rb +12 -9
  7. data/lib/mittsu/core/object_3d.rb +33 -66
  8. data/lib/mittsu/lights/ambient_light.rb +8 -0
  9. data/lib/mittsu/lights/directional_light.rb +9 -0
  10. data/lib/mittsu/lights/hemisphere_light.rb +9 -0
  11. data/lib/mittsu/lights/point_light.rb +11 -0
  12. data/lib/mittsu/lights/spot_light.rb +13 -0
  13. data/lib/mittsu/loaders.rb +1 -0
  14. data/lib/mittsu/loaders/mtl_loader.rb +5 -12
  15. data/lib/mittsu/loaders/obj_loader.rb +212 -0
  16. data/lib/mittsu/loaders/obj_mtl_loader.rb +11 -207
  17. data/lib/mittsu/materials/material.rb +5 -2
  18. data/lib/mittsu/materials/mesh_basic_material.rb +0 -9
  19. data/lib/mittsu/math/color.rb +44 -104
  20. data/lib/mittsu/math/matrix3.rb +8 -1
  21. data/lib/mittsu/math/matrix4.rb +6 -0
  22. data/lib/mittsu/math/vector.rb +251 -0
  23. data/lib/mittsu/math/vector2.rb +14 -213
  24. data/lib/mittsu/math/vector3.rb +61 -351
  25. data/lib/mittsu/math/vector4.rb +45 -295
  26. data/lib/mittsu/objects/line.rb +12 -2
  27. data/lib/mittsu/objects/mesh.rb +18 -9
  28. data/lib/mittsu/renderers/glfw_window.rb +15 -13
  29. data/lib/mittsu/renderers/opengl/core/opengl_geometry.rb +253 -0
  30. data/lib/mittsu/renderers/opengl/core/opengl_object_3d.rb +131 -0
  31. data/lib/mittsu/renderers/opengl/lights/opengl_ambient_light.rb +26 -0
  32. data/lib/mittsu/renderers/opengl/lights/opengl_directional_light.rb +35 -0
  33. data/lib/mittsu/renderers/opengl/lights/opengl_hemisphere_light.rb +42 -0
  34. data/lib/mittsu/renderers/opengl/lights/opengl_light.rb +52 -0
  35. data/lib/mittsu/renderers/opengl/lights/opengl_point_light.rb +36 -0
  36. data/lib/mittsu/renderers/opengl/lights/opengl_spot_light.rb +47 -0
  37. data/lib/mittsu/renderers/opengl/materials/opengl_line_basic_material.rb +16 -0
  38. data/lib/mittsu/renderers/opengl/materials/opengl_material.rb +275 -0
  39. data/lib/mittsu/renderers/opengl/materials/opengl_mesh_basic_material.rb +69 -0
  40. data/lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb +29 -0
  41. data/lib/mittsu/renderers/opengl/materials/opengl_mesh_phong_material.rb +40 -0
  42. data/lib/mittsu/renderers/opengl/materials/opengl_shader_material.rb +11 -0
  43. data/lib/mittsu/renderers/opengl/objects/opengl_group.rb +8 -0
  44. data/lib/mittsu/renderers/opengl/objects/opengl_line.rb +54 -0
  45. data/lib/mittsu/renderers/opengl/objects/opengl_mesh.rb +77 -0
  46. data/lib/mittsu/renderers/opengl/opengl_buffer.rb +5 -0
  47. data/lib/mittsu/renderers/opengl/opengl_debug.rb +49 -7
  48. data/lib/mittsu/renderers/opengl/opengl_default_target.rb +54 -0
  49. data/lib/mittsu/renderers/opengl/opengl_geometry_group.rb +763 -0
  50. data/lib/mittsu/renderers/opengl/opengl_geometry_like.rb +130 -0
  51. data/lib/mittsu/renderers/opengl/opengl_helper.rb +161 -0
  52. data/lib/mittsu/renderers/opengl/opengl_implementations.rb +61 -0
  53. data/lib/mittsu/renderers/opengl/opengl_light_renderer.rb +43 -0
  54. data/lib/mittsu/renderers/opengl/opengl_mittsu_params.rb +53 -0
  55. data/lib/mittsu/renderers/opengl/opengl_program.rb +147 -296
  56. data/lib/mittsu/renderers/opengl/opengl_state.rb +3 -5
  57. data/lib/mittsu/renderers/opengl/plugins/shadow_map_plugin.rb +12 -10
  58. data/lib/mittsu/renderers/opengl/scenes/opengl_scene.rb +8 -0
  59. data/lib/mittsu/renderers/opengl/textures/opengl_compressed_texture.rb +21 -0
  60. data/lib/mittsu/renderers/opengl/textures/opengl_cube_texture.rb +75 -0
  61. data/lib/mittsu/renderers/opengl/textures/opengl_data_texture.rb +23 -0
  62. data/lib/mittsu/renderers/opengl/textures/opengl_texture.rb +111 -0
  63. data/lib/mittsu/renderers/opengl_render_target.rb +117 -2
  64. data/lib/mittsu/renderers/opengl_renderer.rb +653 -2978
  65. data/lib/mittsu/renderers/shaders/rbsl_loader.rb +166 -0
  66. data/lib/mittsu/renderers/shaders/shader_chunk.rb +6 -9
  67. data/lib/mittsu/renderers/shaders/shader_chunk/shadowmap_fragment.glsl +36 -37
  68. data/lib/mittsu/renderers/shaders/shader_lib.rb +26 -403
  69. data/lib/mittsu/renderers/shaders/shader_lib/basic/basic_fragment.rbsl +37 -0
  70. data/lib/mittsu/renderers/shaders/shader_lib/basic/basic_uniforms.rbslu +3 -0
  71. data/lib/mittsu/renderers/shaders/shader_lib/basic/basic_vertex.rbsl +33 -0
  72. data/lib/mittsu/renderers/shaders/shader_lib/cube/cube_fragment.rbsl +12 -0
  73. data/lib/mittsu/renderers/shaders/shader_lib/cube/cube_uniforms.rbslu +2 -0
  74. data/lib/mittsu/renderers/shaders/shader_lib/cube/cube_vertex.rbsl +12 -0
  75. data/lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_fragment.rbsl +26 -0
  76. data/lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_uniforms.rbslu +0 -0
  77. data/lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_vertex.rbsl +12 -0
  78. data/lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_fragment.rbsl +56 -0
  79. data/lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_uniforms.rbslu +7 -0
  80. data/lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_vertex.rbsl +37 -0
  81. data/lib/mittsu/renderers/shaders/shader_lib/phong/phong_fragment.rbsl +45 -0
  82. data/lib/mittsu/renderers/shaders/shader_lib/phong/phong_uniforms.rbslu +11 -0
  83. data/lib/mittsu/renderers/shaders/shader_lib/phong/phong_vertex.rbsl +43 -0
  84. data/lib/mittsu/renderers/shaders/shader_templates/fragment.glsl.erb +105 -0
  85. data/lib/mittsu/renderers/shaders/shader_templates/vertex.glsl.erb +143 -0
  86. data/lib/mittsu/renderers/shaders/uniforms_lib.rb +54 -55
  87. data/lib/mittsu/textures/texture.rb +5 -2
  88. data/lib/mittsu/version.rb +1 -1
  89. data/run_all_examples.sh +7 -0
  90. metadata +77 -28
  91. data/.ruby-version +0 -1
  92. data/lib/mittsu/core/hash_object.rb +0 -19
@@ -0,0 +1,143 @@
1
+ #version 330
2
+
3
+ <%= custom_defines %>
4
+
5
+ <% if parameters[:supports_vertex_textures] %>
6
+ #define VERTEX_TEXTURES
7
+ <% end %>
8
+
9
+ <% if @renderer.gamma_input %>
10
+ #define GAMMA_INPUT
11
+ <% end %>
12
+ <% if @renderer.gamma_output %>
13
+ #define GAMMA_OUTPUT
14
+ <% end %>
15
+ #define GAMMA_FACTOR <%= gamma_factor_define %>
16
+
17
+ #define MAX_DIR_LIGHTS <%= parameters[:max_dir_lights] %>
18
+ #define MAX_POINT_LIGHTS <%= parameters[:max_point_lights] %>
19
+ #define MAX_SPOT_LIGHTS <%= parameters[:max_spot_lights] %>
20
+ #define MAX_HEMI_LIGHTS <%= parameters[:max_hemi_lights] %>
21
+
22
+ #define MAX_SHADOWS <%= parameters[:max_shadows] %>
23
+
24
+ #define MAX_BONES <%= parameters[:max_bones] %>
25
+
26
+ <% if parameters[:map] %>
27
+ #define USE_MAP
28
+ <% end %>
29
+ <% if parameters[:env_map] %>
30
+ #define USE_ENVMAP
31
+ <% end %>
32
+ <% if parameters[:env_map] %>
33
+ #define <%= env_map_mode_define %>
34
+ <% end %>
35
+ <% if parameters[:light_map] %>
36
+ #define USE_LIGHTMAP
37
+ <% end %>
38
+ <% if parameters[:bump_map] %>
39
+ #define USE_BUMPMAP
40
+ <% end %>
41
+ <% if parameters[:normal_map] %>
42
+ #define USE_NORMALMAP
43
+ <% end %>
44
+ <% if parameters[:specular_map] %>
45
+ #define USE_SPECULARMAP
46
+ <% end %>
47
+ <% if parameters[:alpha_map] %>
48
+ #define USE_ALPHAMAP
49
+ <% end %>
50
+ <% if parameters[:vertex_colors] %>
51
+ #define USE_COLOR
52
+ <% end %>
53
+
54
+ <% if parameters[:flat_shading] %>
55
+ #define FLAT_SHADED
56
+ <% end %>
57
+
58
+ <% if parameters[:skinning] %>
59
+ #define USE_SKINNING
60
+ <% end %>
61
+ <% if parameters[:use_vertex_texture] %>
62
+ #define BONE_TEXTURE
63
+ <% end %>
64
+
65
+ <% if parameters[:morph_targets] %>
66
+ #define USE_MORPHTARGETS
67
+ <% end %>
68
+ <% if parameters[:morph_normals] %>
69
+ #define USE_MORPHNORMALS
70
+ <% end %>
71
+ <% if parameters[:wrap_around] %>
72
+ #define WRAP_AROUND
73
+ <% end %>
74
+ <% if parameters[:double_sided] %>
75
+ #define DOUBLE_SIDED
76
+ <% end %>
77
+ <% if parameters[:flip_sided] %>
78
+ #define FLIP_SIDED
79
+ <% end %>
80
+
81
+ <% if parameters[:shadow_map_enabled] %>
82
+ #define USE_SHADOWMAP
83
+ <% end %>
84
+ <% if parameters[:shadow_map_enabled] %>
85
+ #define <%= shadow_map_type_define %>
86
+ <% end %>
87
+ <% if parameters[:shadow_map_debug] %>
88
+ #define SHADOWMAP_DEBUG
89
+ <% end %>
90
+ <% if parameters[:shadow_map_cascade] %>
91
+ #define SHADOWMAP_CASCADE
92
+ <% end %>
93
+
94
+ <% if parameters[:size_attenuation] %>
95
+ #define USE_SIZEATTENUATION
96
+ <% end %>
97
+
98
+ <% if parameters[:logarithmic_depth_buffer] %>
99
+ #define USE_LOGDEPTHBUF
100
+ <% end %>
101
+ // @renderer._glExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '',
102
+
103
+
104
+ uniform mat4 modelMatrix;
105
+ uniform mat4 modelViewMatrix;
106
+ uniform mat4 projectionMatrix;
107
+ uniform mat4 viewMatrix;
108
+ uniform mat3 normalMatrix;
109
+ uniform vec3 cameraPosition;
110
+
111
+ in vec3 position;
112
+ in vec3 normal;
113
+ in vec2 uv;
114
+ in vec2 uv2;
115
+
116
+ #ifdef USE_COLOR
117
+ in vec3 color;
118
+ #endif
119
+
120
+ #ifdef USE_MORPHTARGETS
121
+ in vec3 morphTarget0;
122
+ in vec3 morphTarget1;
123
+ in vec3 morphTarget2;
124
+ in vec3 morphTarget3;
125
+
126
+ #ifdef USE_MORPHNORMALS
127
+ in vec3 morphNormal0;
128
+ in vec3 morphNormal1;
129
+ in vec3 morphNormal2;
130
+ in vec3 morphNormal3;
131
+ #else
132
+ in vec3 morphTarget4;
133
+ in vec3 morphTarget5;
134
+ in vec3 morphTarget6;
135
+ in vec3 morphTarget7;
136
+ #endif
137
+
138
+ #endif
139
+
140
+ #ifdef USE_SKINNING
141
+ in vec4 skinIndex;
142
+ in vec4 skinWeight;
143
+ #endif
@@ -1,9 +1,8 @@
1
1
  require 'mittsu/math'
2
- require 'mittsu/core/hash_object'
3
2
 
4
3
  module Mittsu
5
- class Uniform < HashObject
6
- attr_accessor :type, :value, :needs_update
4
+ class Uniform
5
+ attr_accessor :type, :value, :needs_update, :array
7
6
 
8
7
  def initialize(type, value)
9
8
  super()
@@ -26,82 +25,82 @@ module Mittsu
26
25
 
27
26
  UniformsLib = {
28
27
  common: {
29
- 'diffuse' => Uniform.new(:c, Color.new(0xeeeeee)),
30
- 'opacity' => Uniform.new(:f, 1.0),
28
+ 'diffuse' => Uniform.new(:color, Color.new(0xeeeeee)),
29
+ 'opacity' => Uniform.new(:float, 1.0),
31
30
 
32
- 'map' => Uniform.new(:t, nil),
33
- 'offsetRepeat' => Uniform.new(:v4, Vector4.new(0.0, 0.0, 1.0, 1.0)),
31
+ 'map' => Uniform.new(:texture, nil),
32
+ 'offsetRepeat' => Uniform.new(:vec4, Vector4.new(0.0, 0.0, 1.0, 1.0)),
34
33
 
35
- 'lightMap' => Uniform.new(:t, nil),
36
- 'specularMap' => Uniform.new(:t, nil),
37
- 'alphaMap' => Uniform.new(:t, nil),
34
+ 'lightMap' => Uniform.new(:texture, nil),
35
+ 'specularMap' => Uniform.new(:texture, nil),
36
+ 'alphaMap' => Uniform.new(:texture, nil),
38
37
 
39
- 'envMap' => Uniform.new(:t, nil),
40
- 'flipEnvMap' => Uniform.new(:f, -1.0),
41
- 'reflectivity' => Uniform.new(:f, 1.0),
42
- 'refractionRatio' => Uniform.new(:f, 0.98),
38
+ 'envMap' => Uniform.new(:texture, nil),
39
+ 'flipEnvMap' => Uniform.new(:float, -1.0),
40
+ 'reflectivity' => Uniform.new(:float, 1.0),
41
+ 'refractionRatio' => Uniform.new(:float, 0.98),
43
42
 
44
- 'morphTargetInfluences' => Uniform.new(:f, 0.0)
43
+ 'morphTargetInfluences' => Uniform.new(:float, 0.0)
45
44
  },
46
45
 
47
46
  bump: {
48
- 'bumpMap' => Uniform.new(:t, nil),
49
- 'bumpScale' => Uniform.new(:f, 1.0)
47
+ 'bumpMap' => Uniform.new(:texture, nil),
48
+ 'bumpScale' => Uniform.new(:float, 1.0)
50
49
  },
51
50
 
52
51
  normal_map: {
53
- 'normalMap' => Uniform.new(:t, nil),
54
- 'normalScale' => Uniform.new(:v2, Vector2.new(1.0, 1.0))
52
+ 'normalMap' => Uniform.new(:texture, nil),
53
+ 'normalScale' => Uniform.new(:vec2, Vector2.new(1.0, 1.0))
55
54
  },
56
55
 
57
56
  fog: {
58
- 'fogDensity' => Uniform.new(:f, 0.00025),
59
- 'fogNear' => Uniform.new(:f, 1.0),
60
- 'fogFar' => Uniform.new(:f, 2000.0),
61
- 'fogColor' => Uniform.new(:c, Color.new(0xffffff))
57
+ 'fogDensity' => Uniform.new(:float, 0.00025),
58
+ 'fogNear' => Uniform.new(:float, 1.0),
59
+ 'fogFar' => Uniform.new(:float, 2000.0),
60
+ 'fogColor' => Uniform.new(:color, Color.new(0xffffff))
62
61
  },
63
62
 
64
63
  lights: {
65
- 'ambientLightColor' => Uniform.new(:fv, []),
66
-
67
- 'directionalLightDirection' => Uniform.new(:fv, []),
68
- 'directionalLightColor' => Uniform.new(:fv, []),
69
-
70
- 'hemisphereLightDirection' => Uniform.new(:fv, []),
71
- 'hemisphereLightSkyColor' => Uniform.new(:fv, []),
72
- 'hemisphereLightGroundColor' => Uniform.new(:fv, []),
73
-
74
- 'pointLightColor' => Uniform.new(:fv, []),
75
- 'pointLightPosition' => Uniform.new(:fv, []),
76
- 'pointLightDistance' => Uniform.new(:fv1, []),
77
- 'pointLightDecay' => Uniform.new(:fv1, []),
78
-
79
- 'spotLightColor' => Uniform.new(:fv, []),
80
- 'spotLightPosition' => Uniform.new(:fv, []),
81
- 'spotLightDirection' => Uniform.new(:fv, []),
82
- 'spotLightDistance' => Uniform.new(:fv, []),
83
- 'spotLightAngleCos' => Uniform.new(:fv, []),
84
- 'spotLightExponent' => Uniform.new(:fv, []),
85
- 'spotLightDecay' => Uniform.new(:fv, [])
64
+ 'ambientLightColor' => Uniform.new(:color, Color.new(0xffffff)),
65
+
66
+ 'directionalLightDirection' => Uniform.new(:'vec3[]', []),
67
+ 'directionalLightColor' => Uniform.new(:'color[]', []),
68
+
69
+ 'hemisphereLightDirection' => Uniform.new(:'vec3[]', []),
70
+ 'hemisphereLightSkyColor' => Uniform.new(:'color[]', []),
71
+ 'hemisphereLightGroundColor' => Uniform.new(:'color[]', []),
72
+
73
+ 'pointLightColor' => Uniform.new(:'color[]', []),
74
+ 'pointLightPosition' => Uniform.new(:'vec3[]', []),
75
+ 'pointLightDistance' => Uniform.new(:'float[]', []),
76
+ 'pointLightDecay' => Uniform.new(:'float[]', []),
77
+
78
+ 'spotLightColor' => Uniform.new(:'color[]', []),
79
+ 'spotLightPosition' => Uniform.new(:'vec3[]', []),
80
+ 'spotLightDirection' => Uniform.new(:'vec3[]', []),
81
+ 'spotLightDistance' => Uniform.new(:'float[]', []),
82
+ 'spotLightAngleCos' => Uniform.new(:'float[]', []),
83
+ 'spotLightExponent' => Uniform.new(:'float[]', []),
84
+ 'spotLightDecay' => Uniform.new(:'float[]', [])
86
85
  },
87
86
 
88
87
  particle: {
89
- 'psColor' => Uniform.new(:c, Color.new(0xeeeeee)),
90
- 'opacity' => Uniform.new(:f, 1.0),
91
- 'size' => Uniform.new(:f, 1.0),
92
- 'scale' => Uniform.new(:f, 1.0),
93
- 'map' => Uniform.new(:t, nil),
94
- 'offsetRepeat' => Uniform.new(:v4, Vector4.new(0.0, 0.0, 1.0, 1.0))
88
+ 'psColor' => Uniform.new(:color, Color.new(0xeeeeee)),
89
+ 'opacity' => Uniform.new(:float, 1.0),
90
+ 'size' => Uniform.new(:float, 1.0),
91
+ 'scale' => Uniform.new(:float, 1.0),
92
+ 'map' => Uniform.new(:texture, nil),
93
+ 'offsetRepeat' => Uniform.new(:vec4, Vector4.new(0.0, 0.0, 1.0, 1.0))
95
94
  },
96
95
 
97
96
  shadow_map: {
98
- 'shadowMap' => Uniform.new(:tv, []),
99
- 'shadowMapSize' => Uniform.new(:v2v, []),
97
+ 'shadowMap' => Uniform.new(:'texture[]', []),
98
+ 'shadowMapSize' => Uniform.new(:'vec2[]', []),
100
99
 
101
- 'shadowBias' => Uniform.new(:fv1, []),
102
- 'shadowDarkness' => Uniform.new(:fv1, []),
100
+ 'shadowBias' => Uniform.new(:'float[]', []),
101
+ 'shadowDarkness' => Uniform.new(:'float[]', []),
103
102
 
104
- 'shadowMatrix' => Uniform.new(:m4v, [])
103
+ 'shadowMatrix' => Uniform.new(:'mat4[]', [])
105
104
  }
106
105
  }
107
106
  end
@@ -2,10 +2,9 @@ require 'securerandom'
2
2
  require 'mittsu/math'
3
3
  require 'mittsu/core/event_dispatcher'
4
4
  require 'mittsu/constants'
5
- require 'mittsu/core/hash_object'
6
5
 
7
6
  module Mittsu
8
- class Texture < HashObject
7
+ class Texture
9
8
  include EventDispatcher
10
9
 
11
10
  DEFAULT_IMAGE = nil
@@ -88,5 +87,9 @@ module Mittsu
88
87
  def dispose
89
88
  dispatch_event type: :dispose
90
89
  end
90
+
91
+ def implementation(renderer)
92
+ @_implementation ||= renderer.create_implementation(self)
93
+ end
91
94
  end
92
95
  end
@@ -1,4 +1,4 @@
1
1
  module Mittsu
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  REVISION = "71"
4
4
  end
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ set -x
3
+ set -e
4
+
5
+ cd examples
6
+
7
+ ls *.rb | grep '^[0-9]' | xargs -n 1 ruby
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mittsu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-21 00:00:00.000000000 Z
11
+ date: 2016-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opengl-bindings
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ffi
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.9'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.9'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rmagick
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.15'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.15'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.9'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.9'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '10.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '5.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '5.7'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: minitest-reporters
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.1'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0.10'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.10'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: benchmark-ips
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '2.3'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '2.3'
139
139
  description: Mittsu makes 3D graphics easier by providing an abstraction over OpenGL,
@@ -146,10 +146,9 @@ executables: []
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
- - .codeclimate.yml
150
- - .gitignore
151
- - .rubocop.yml
152
- - .ruby-version
149
+ - ".codeclimate.yml"
150
+ - ".gitignore"
151
+ - ".rubocop.yml"
153
152
  - CODE_OF_CONDUCT.md
154
153
  - Gemfile
155
154
  - LICENSE.txt
@@ -175,7 +174,6 @@ files:
175
174
  - lib/mittsu/core/face3.rb
176
175
  - lib/mittsu/core/geometry.rb
177
176
  - lib/mittsu/core/hash_array.rb
178
- - lib/mittsu/core/hash_object.rb
179
177
  - lib/mittsu/core/object_3d.rb
180
178
  - lib/mittsu/core/raycaster.rb
181
179
  - lib/mittsu/extras.rb
@@ -201,6 +199,7 @@ files:
201
199
  - lib/mittsu/loaders/loader.rb
202
200
  - lib/mittsu/loaders/loading_manager.rb
203
201
  - lib/mittsu/loaders/mtl_loader.rb
202
+ - lib/mittsu/loaders/obj_loader.rb
204
203
  - lib/mittsu/loaders/obj_mtl_loader.rb
205
204
  - lib/mittsu/materials.rb
206
205
  - lib/mittsu/materials/line_basic_material.rb
@@ -226,6 +225,7 @@ files:
226
225
  - lib/mittsu/math/sphere.rb
227
226
  - lib/mittsu/math/spline.rb
228
227
  - lib/mittsu/math/triangle.rb
228
+ - lib/mittsu/math/vector.rb
229
229
  - lib/mittsu/math/vector2.rb
230
230
  - lib/mittsu/math/vector3.rb
231
231
  - lib/mittsu/math/vector4.rb
@@ -235,13 +235,44 @@ files:
235
235
  - lib/mittsu/objects/mesh.rb
236
236
  - lib/mittsu/renderers.rb
237
237
  - lib/mittsu/renderers/glfw_window.rb
238
+ - lib/mittsu/renderers/opengl/core/opengl_geometry.rb
239
+ - lib/mittsu/renderers/opengl/core/opengl_object_3d.rb
240
+ - lib/mittsu/renderers/opengl/lights/opengl_ambient_light.rb
241
+ - lib/mittsu/renderers/opengl/lights/opengl_directional_light.rb
242
+ - lib/mittsu/renderers/opengl/lights/opengl_hemisphere_light.rb
243
+ - lib/mittsu/renderers/opengl/lights/opengl_light.rb
244
+ - lib/mittsu/renderers/opengl/lights/opengl_point_light.rb
245
+ - lib/mittsu/renderers/opengl/lights/opengl_spot_light.rb
246
+ - lib/mittsu/renderers/opengl/materials/opengl_line_basic_material.rb
247
+ - lib/mittsu/renderers/opengl/materials/opengl_material.rb
248
+ - lib/mittsu/renderers/opengl/materials/opengl_mesh_basic_material.rb
249
+ - lib/mittsu/renderers/opengl/materials/opengl_mesh_lambert_material.rb
250
+ - lib/mittsu/renderers/opengl/materials/opengl_mesh_phong_material.rb
251
+ - lib/mittsu/renderers/opengl/materials/opengl_shader_material.rb
252
+ - lib/mittsu/renderers/opengl/objects/opengl_group.rb
253
+ - lib/mittsu/renderers/opengl/objects/opengl_line.rb
254
+ - lib/mittsu/renderers/opengl/objects/opengl_mesh.rb
255
+ - lib/mittsu/renderers/opengl/opengl_buffer.rb
238
256
  - lib/mittsu/renderers/opengl/opengl_debug.rb
257
+ - lib/mittsu/renderers/opengl/opengl_default_target.rb
258
+ - lib/mittsu/renderers/opengl/opengl_geometry_group.rb
259
+ - lib/mittsu/renderers/opengl/opengl_geometry_like.rb
260
+ - lib/mittsu/renderers/opengl/opengl_helper.rb
261
+ - lib/mittsu/renderers/opengl/opengl_implementations.rb
262
+ - lib/mittsu/renderers/opengl/opengl_light_renderer.rb
263
+ - lib/mittsu/renderers/opengl/opengl_mittsu_params.rb
239
264
  - lib/mittsu/renderers/opengl/opengl_program.rb
240
265
  - lib/mittsu/renderers/opengl/opengl_shader.rb
241
266
  - lib/mittsu/renderers/opengl/opengl_state.rb
242
267
  - lib/mittsu/renderers/opengl/plugins/shadow_map_plugin.rb
268
+ - lib/mittsu/renderers/opengl/scenes/opengl_scene.rb
269
+ - lib/mittsu/renderers/opengl/textures/opengl_compressed_texture.rb
270
+ - lib/mittsu/renderers/opengl/textures/opengl_cube_texture.rb
271
+ - lib/mittsu/renderers/opengl/textures/opengl_data_texture.rb
272
+ - lib/mittsu/renderers/opengl/textures/opengl_texture.rb
243
273
  - lib/mittsu/renderers/opengl_render_target.rb
244
274
  - lib/mittsu/renderers/opengl_renderer.rb
275
+ - lib/mittsu/renderers/shaders/rbsl_loader.rb
245
276
  - lib/mittsu/renderers/shaders/shader_chunk.rb
246
277
  - lib/mittsu/renderers/shaders/shader_chunk/alphamap_fragment.glsl
247
278
  - lib/mittsu/renderers/shaders/shader_chunk/alphamap_pars_fragment.glsl
@@ -297,6 +328,23 @@ files:
297
328
  - lib/mittsu/renderers/shaders/shader_chunk/specularmap_pars_fragment.glsl
298
329
  - lib/mittsu/renderers/shaders/shader_chunk/worldpos_vertex.glsl
299
330
  - lib/mittsu/renderers/shaders/shader_lib.rb
331
+ - lib/mittsu/renderers/shaders/shader_lib/basic/basic_fragment.rbsl
332
+ - lib/mittsu/renderers/shaders/shader_lib/basic/basic_uniforms.rbslu
333
+ - lib/mittsu/renderers/shaders/shader_lib/basic/basic_vertex.rbsl
334
+ - lib/mittsu/renderers/shaders/shader_lib/cube/cube_fragment.rbsl
335
+ - lib/mittsu/renderers/shaders/shader_lib/cube/cube_uniforms.rbslu
336
+ - lib/mittsu/renderers/shaders/shader_lib/cube/cube_vertex.rbsl
337
+ - lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_fragment.rbsl
338
+ - lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_uniforms.rbslu
339
+ - lib/mittsu/renderers/shaders/shader_lib/depth_rgba/depth_rgba_vertex.rbsl
340
+ - lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_fragment.rbsl
341
+ - lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_uniforms.rbslu
342
+ - lib/mittsu/renderers/shaders/shader_lib/lambert/lambert_vertex.rbsl
343
+ - lib/mittsu/renderers/shaders/shader_lib/phong/phong_fragment.rbsl
344
+ - lib/mittsu/renderers/shaders/shader_lib/phong/phong_uniforms.rbslu
345
+ - lib/mittsu/renderers/shaders/shader_lib/phong/phong_vertex.rbsl
346
+ - lib/mittsu/renderers/shaders/shader_templates/fragment.glsl.erb
347
+ - lib/mittsu/renderers/shaders/shader_templates/vertex.glsl.erb
300
348
  - lib/mittsu/renderers/shaders/uniforms_lib.rb
301
349
  - lib/mittsu/renderers/shaders/uniforms_utils.rb
302
350
  - lib/mittsu/scenes.rb
@@ -309,6 +357,7 @@ files:
309
357
  - lib/mittsu/textures/video_texture.rb
310
358
  - lib/mittsu/version.rb
311
359
  - mittsu.gemspec
360
+ - run_all_examples.sh
312
361
  homepage: https://github.com/jellymann/mittsu
313
362
  licenses:
314
363
  - MIT
@@ -320,19 +369,19 @@ require_paths:
320
369
  - lib
321
370
  required_ruby_version: !ruby/object:Gem::Requirement
322
371
  requirements:
323
- - - '>='
372
+ - - ">="
324
373
  - !ruby/object:Gem::Version
325
374
  version: 2.0.0
326
375
  required_rubygems_version: !ruby/object:Gem::Requirement
327
376
  requirements:
328
- - - '>='
377
+ - - ">="
329
378
  - !ruby/object:Gem::Version
330
379
  version: '0'
331
380
  requirements:
332
381
  - ImageMagick 6.4.9 or later
333
382
  - OpenGL 3.3+ capable hardware and drivers
334
383
  rubyforge_project:
335
- rubygems_version: 2.0.14
384
+ rubygems_version: 2.5.1
336
385
  signing_key:
337
386
  specification_version: 4
338
387
  summary: 3D Graphics Library for Ruby