rays 0.1.28 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/rays/exception.cpp +45 -0
  3. data/.doc/ext/rays/native.cpp +2 -0
  4. data/.doc/ext/rays/shader.cpp +100 -6
  5. data/VERSION +1 -1
  6. data/ext/rays/defs.h +1 -0
  7. data/ext/rays/exception.cpp +45 -0
  8. data/ext/rays/native.cpp +2 -0
  9. data/ext/rays/shader.cpp +101 -5
  10. data/include/rays/exception.h +11 -0
  11. data/include/rays/ruby/bitmap.h +0 -1
  12. data/include/rays/ruby/bounds.h +0 -2
  13. data/include/rays/ruby/camera.h +0 -1
  14. data/include/rays/ruby/color.h +0 -2
  15. data/include/rays/ruby/color_space.h +0 -1
  16. data/include/rays/ruby/defs.h +30 -0
  17. data/include/rays/ruby/exception.h +28 -0
  18. data/include/rays/ruby/font.h +0 -1
  19. data/include/rays/ruby/image.h +0 -1
  20. data/include/rays/ruby/matrix.h +0 -1
  21. data/include/rays/ruby/painter.h +0 -1
  22. data/include/rays/ruby/point.h +0 -2
  23. data/include/rays/ruby/polygon.h +0 -1
  24. data/include/rays/ruby/polyline.h +0 -1
  25. data/include/rays/ruby/rays.h +0 -1
  26. data/include/rays/ruby/shader.h +0 -1
  27. data/include/rays/ruby.h +2 -0
  28. data/include/rays/shader.h +48 -1
  29. data/lib/rays/painter.rb +6 -5
  30. data/lib/rays/point.rb +1 -0
  31. data/lib/rays/shader.rb +18 -5
  32. data/rays.gemspec +2 -2
  33. data/src/exception.cpp +13 -0
  34. data/src/image.cpp +6 -4
  35. data/src/opengl.cpp +21 -7
  36. data/src/opengl.h +5 -3
  37. data/src/osx/font.mm +0 -2
  38. data/src/osx/opengl.mm +17 -2
  39. data/src/painter.cpp +196 -125
  40. data/src/shader.cpp +333 -53
  41. data/src/shader.h +53 -14
  42. data/src/shader_program.cpp +53 -27
  43. data/src/shader_program.h +8 -1
  44. data/src/shader_source.cpp +2 -2
  45. data/src/texture.cpp +75 -63
  46. data/test/test_point.rb +6 -5
  47. data/test/test_rays.rb +2 -2
  48. data/test/test_shader.rb +151 -14
  49. metadata +11 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38052c848aef75871de813ae9cc59a956672b1c6b8db25b55916f041ae0df976
4
- data.tar.gz: d1f462fce0b73364a015fa1826eef17c3d1a4ac0b4378590f20438d87ce8e1cf
3
+ metadata.gz: d598cf8c5059a425c7f26881d6a5f411969ed3ad46f07c331372d398f17bf9e6
4
+ data.tar.gz: 7f87f57fbaf8deee511e248ce2d8fea4b1e445cda91ec324fd85b9f3959a8e16
5
5
  SHA512:
6
- metadata.gz: 9e01828d4ac2ad4749a9d050d3890669be7e35dd057cc92b0dae23f645954b44bf7f3775d193ef36d9590d10879175a7937b28ceddf0bf9fd29a84723f0cfdbe
7
- data.tar.gz: da8b670d9e704d4cc48070d5d252ec504e433f00222160a5c42ccf7a036eabc1a31580b6318da59672bc8576b0dddf84fce635ce9194f4a462eebfc8d4e03451
6
+ metadata.gz: 3e82501e4410fdb429f04cc8acd33a56eeff585ba918a9bfed05ef59db5db61997e279557ec5c3f7e329af285a439f5c49d94be4a4cf7de909f299926e584d2a
7
+ data.tar.gz: 8f27df0f080dc97f0f22bbc45abd6a0355d39190a3ff6d48a53abe0c947ca6bc92a5304a214680c7c9871dfa7fde426ef65acc361de594fb113e9ed0c19615fe
@@ -0,0 +1,45 @@
1
+ #include "rays/ruby/exception.h"
2
+
3
+
4
+ #include "defs.h"
5
+
6
+
7
+ static Class cRaysError;
8
+ static Class cOpenGLError;
9
+ static Class cShaderError;
10
+
11
+ void
12
+ Init_exception ()
13
+ {
14
+ Module mRays = rb_define_module("Rays");
15
+
16
+ cRaysError = rb_define_class_under(mRays, "RaysError", rb_eRuntimeError);
17
+ cOpenGLError = rb_define_class_under(mRays, "OpenGLError", cRaysError);
18
+ cShaderError = rb_define_class_under(mRays, "ShaderError", cOpenGLError);
19
+ }
20
+
21
+
22
+ namespace Rays
23
+ {
24
+
25
+
26
+ Class
27
+ rays_error_class ()
28
+ {
29
+ return cRaysError;
30
+ }
31
+
32
+ Class
33
+ opengl_error_class ()
34
+ {
35
+ return cOpenGLError;
36
+ }
37
+
38
+ Class
39
+ shader_error_class ()
40
+ {
41
+ return cShaderError;
42
+ }
43
+
44
+
45
+ }// Rays
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
  void Init_rays ();
5
+ void Init_exception ();
5
6
 
6
7
  void Init_point ();
7
8
  void Init_bounds ();
@@ -34,6 +35,7 @@ extern "C" void
34
35
  Rucy::init();
35
36
 
36
37
  Init_rays();
38
+ Init_exception();
37
39
 
38
40
  Init_point();
39
41
  Init_bounds();
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/shader.h"
2
2
 
3
3
 
4
+ #include "rays/ruby/image.h"
4
5
  #include "defs.h"
5
6
 
6
7
 
@@ -17,12 +18,83 @@ VALUE alloc(VALUE klass)
17
18
  return new_type<Rays::Shader>(klass);
18
19
  }
19
20
 
21
+ static const char*
22
+ to_name (const Value& names, size_t index)
23
+ {
24
+ if (!names || !names.is_array() || index >= names.size())
25
+ return NULL;
26
+
27
+ const auto& name = names[index];
28
+ if (!name) return NULL;
29
+
30
+ return name.c_str();
31
+ }
32
+
33
+ static Rays::ShaderEnv::NameList
34
+ to_name_list (const Value& names, size_t index)
35
+ {
36
+ if (!names || !names.is_array() || index >= names.size())
37
+ return {};
38
+
39
+ const auto& name_or_array = names[index];
40
+ if (name_or_array.is_array())
41
+ {
42
+ Rays::ShaderEnv::NameList list;
43
+ for (size_t i = 0; i < name_or_array.size(); ++i)
44
+ list.emplace_back(name_or_array[i].c_str());
45
+ return list;
46
+ }
47
+ else if (name_or_array.is_s() || name_or_array.is_sym())
48
+ return {Xot::String(name_or_array.c_str())};
49
+ else
50
+ return {};
51
+ }
52
+
53
+ static std::shared_ptr<Rays::ShaderEnv>
54
+ make_env (const Value& names, const Value& ignore_no_uniform_location_error)
55
+ {
56
+ bool has_names = names && names.is_array() && !names.empty();
57
+ if (!has_names && !ignore_no_uniform_location_error)
58
+ return NULL;
59
+
60
+ uint flags = 0;
61
+ if (ignore_no_uniform_location_error)
62
+ flags |= Rays::ShaderEnv::IGNORE_NO_UNIFORM_LOCATION_ERROR;
63
+
64
+ return std::make_shared<Rays::ShaderEnv>(
65
+ to_name_list(names, 0),
66
+ to_name_list(names, 1),
67
+ to_name_list(names, 2),
68
+ to_name( names, 3),
69
+ to_name( names, 4),
70
+ to_name( names, 5),
71
+ to_name_list(names, 6),
72
+ to_name_list(names, 7),
73
+ to_name_list(names, 8),
74
+ to_name_list(names, 9),
75
+ to_name_list(names, 10),
76
+ to_name_list(names, 11),
77
+ flags);
78
+ }
79
+
20
80
  static
21
- VALUE setup(VALUE self, VALUE source)
81
+ VALUE setup(VALUE self, VALUE
82
+ fragment_shader_source, VALUE vertex_shader_source, VALUE
83
+ builtin_variable_names, VALUE ignore_no_uniform_location_error)
22
84
  {
23
85
  RUCY_CHECK_OBJ(Rays::Shader, self);
24
86
 
25
- *THIS = to<Rays::Shader>(source);
87
+ if (fragment_shader_source.is_nil())
88
+ argument_error(__FILE__, __LINE__);
89
+
90
+ const char* fs = fragment_shader_source.c_str();
91
+ const char* vs = vertex_shader_source ? vertex_shader_source.c_str() : NULL;
92
+
93
+ auto env = make_env(builtin_variable_names, ignore_no_uniform_location_error);
94
+ if (env)
95
+ *THIS = Rays::Shader(fs, vs, *env);
96
+ else
97
+ *THIS = Rays::Shader(fs, vs);
26
98
  }
27
99
 
28
100
  static
@@ -31,9 +103,6 @@ VALUE set_uniform(VALUE self)
31
103
  CHECK;
32
104
  check_arg_count(__FILE__, __LINE__, "Painter#set_uniform", argc, 2, 3, 4, 5);
33
105
 
34
- #define Ai(n) (argv[n].as_i())
35
- #define Af(n) ((float) argv[n].as_f())
36
-
37
106
  const char* name = argv[0].c_str();
38
107
  if (argv[1].is_array())
39
108
  {
@@ -46,6 +115,9 @@ VALUE set_uniform(VALUE self)
46
115
  argv += 1;
47
116
  }
48
117
 
118
+ #define Ai(n) (argv[n].as_i())
119
+ #define Af(n) ((float) argv[n].as_f())
120
+
49
121
  if (argv[0].is_i())
50
122
  {
51
123
  switch (argc)
@@ -66,6 +138,8 @@ VALUE set_uniform(VALUE self)
66
138
  case 4: THIS->set_uniform(name, Af(0), Af(1), Af(2), Af(3)); break;
67
139
  }
68
140
  }
141
+ else if (argv[0].is_kind_of(Rays::image_class()))
142
+ THIS->set_uniform(name, to<Rays::Image&>(argv[0]));
69
143
  else
70
144
  argument_error(__FILE__, __LINE__);
71
145
 
@@ -75,6 +149,24 @@ VALUE set_uniform(VALUE self)
75
149
  return self;
76
150
  }
77
151
 
152
+ static
153
+ VALUE get_vertex_shader_source(VALUE self)
154
+ {
155
+ CHECK;
156
+
157
+ const char* source = THIS->vertex_shader_source();
158
+ return source ? value(source) : nil();
159
+ }
160
+
161
+ static
162
+ VALUE get_fragment_shader_source(VALUE self)
163
+ {
164
+ CHECK;
165
+
166
+ const char* source = THIS->fragment_shader_source();
167
+ return source ? value(source) : nil();
168
+ }
169
+
78
170
 
79
171
  static Class cShader;
80
172
 
@@ -85,8 +177,10 @@ Init_shader ()
85
177
 
86
178
  cShader = rb_define_class_under(mRays, "Shader", rb_cObject);
87
179
  rb_define_alloc_func(cShader, alloc);
88
- rb_define_private_method(cShader, "setup", RUBY_METHOD_FUNC(setup), 1);
180
+ rb_define_private_method(cShader, "setup", RUBY_METHOD_FUNC(setup), 4);
89
181
  rb_define_private_method(cShader, "set_uniform", RUBY_METHOD_FUNC(set_uniform), -1);
182
+ rb_define_method(cShader, "vertex_shader_source", RUBY_METHOD_FUNC(get_vertex_shader_source), 0);
183
+ rb_define_method(cShader, "fragment_shader_source", RUBY_METHOD_FUNC(get_fragment_shader_source), 0);
90
184
  }
91
185
 
92
186
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.28
1
+ 0.1.29
data/ext/rays/defs.h CHANGED
@@ -8,6 +8,7 @@
8
8
  #include <rucy.h>
9
9
  #include <rays/defs.h>
10
10
  #include <rays/point.h>
11
+ #include <rays/ruby/defs.h>
11
12
 
12
13
 
13
14
  using namespace Rucy;
@@ -0,0 +1,45 @@
1
+ #include "rays/ruby/exception.h"
2
+
3
+
4
+ #include "defs.h"
5
+
6
+
7
+ static Class cRaysError;
8
+ static Class cOpenGLError;
9
+ static Class cShaderError;
10
+
11
+ void
12
+ Init_exception ()
13
+ {
14
+ Module mRays = define_module("Rays");
15
+
16
+ cRaysError = mRays.define_class("RaysError", rb_eRuntimeError);
17
+ cOpenGLError = mRays.define_class("OpenGLError", cRaysError);
18
+ cShaderError = mRays.define_class("ShaderError", cOpenGLError);
19
+ }
20
+
21
+
22
+ namespace Rays
23
+ {
24
+
25
+
26
+ Class
27
+ rays_error_class ()
28
+ {
29
+ return cRaysError;
30
+ }
31
+
32
+ Class
33
+ opengl_error_class ()
34
+ {
35
+ return cOpenGLError;
36
+ }
37
+
38
+ Class
39
+ shader_error_class ()
40
+ {
41
+ return cShaderError;
42
+ }
43
+
44
+
45
+ }// Rays
data/ext/rays/native.cpp CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
  void Init_rays ();
5
+ void Init_exception ();
5
6
 
6
7
  void Init_point ();
7
8
  void Init_bounds ();
@@ -34,6 +35,7 @@ extern "C" void
34
35
  Rucy::init();
35
36
 
36
37
  Init_rays();
38
+ Init_exception();
37
39
 
38
40
  Init_point();
39
41
  Init_bounds();
data/ext/rays/shader.cpp CHANGED
@@ -1,6 +1,7 @@
1
1
  #include "rays/ruby/shader.h"
2
2
 
3
3
 
4
+ #include "rays/ruby/image.h"
4
5
  #include "defs.h"
5
6
 
6
7
 
@@ -18,12 +19,83 @@ RUCY_DEF_ALLOC(alloc, klass)
18
19
  }
19
20
  RUCY_END
20
21
 
22
+ static const char*
23
+ to_name (const Value& names, size_t index)
24
+ {
25
+ if (!names || !names.is_array() || index >= names.size())
26
+ return NULL;
27
+
28
+ const auto& name = names[index];
29
+ if (!name) return NULL;
30
+
31
+ return name.c_str();
32
+ }
33
+
34
+ static Rays::ShaderEnv::NameList
35
+ to_name_list (const Value& names, size_t index)
36
+ {
37
+ if (!names || !names.is_array() || index >= names.size())
38
+ return {};
39
+
40
+ const auto& name_or_array = names[index];
41
+ if (name_or_array.is_array())
42
+ {
43
+ Rays::ShaderEnv::NameList list;
44
+ for (size_t i = 0; i < name_or_array.size(); ++i)
45
+ list.emplace_back(name_or_array[i].c_str());
46
+ return list;
47
+ }
48
+ else if (name_or_array.is_s() || name_or_array.is_sym())
49
+ return {Xot::String(name_or_array.c_str())};
50
+ else
51
+ return {};
52
+ }
53
+
54
+ static std::shared_ptr<Rays::ShaderEnv>
55
+ make_env (const Value& names, const Value& ignore_no_uniform_location_error)
56
+ {
57
+ bool has_names = names && names.is_array() && !names.empty();
58
+ if (!has_names && !ignore_no_uniform_location_error)
59
+ return NULL;
60
+
61
+ uint flags = 0;
62
+ if (ignore_no_uniform_location_error)
63
+ flags |= Rays::ShaderEnv::IGNORE_NO_UNIFORM_LOCATION_ERROR;
64
+
65
+ return std::make_shared<Rays::ShaderEnv>(
66
+ to_name_list(names, 0),
67
+ to_name_list(names, 1),
68
+ to_name_list(names, 2),
69
+ to_name( names, 3),
70
+ to_name( names, 4),
71
+ to_name( names, 5),
72
+ to_name_list(names, 6),
73
+ to_name_list(names, 7),
74
+ to_name_list(names, 8),
75
+ to_name_list(names, 9),
76
+ to_name_list(names, 10),
77
+ to_name_list(names, 11),
78
+ flags);
79
+ }
80
+
21
81
  static
22
- RUCY_DEF1(setup, source)
82
+ RUCY_DEF4(setup,
83
+ fragment_shader_source, vertex_shader_source,
84
+ builtin_variable_names, ignore_no_uniform_location_error)
23
85
  {
24
86
  RUCY_CHECK_OBJ(Rays::Shader, self);
25
87
 
26
- *THIS = to<Rays::Shader>(source);
88
+ if (fragment_shader_source.is_nil())
89
+ argument_error(__FILE__, __LINE__);
90
+
91
+ const char* fs = fragment_shader_source.c_str();
92
+ const char* vs = vertex_shader_source ? vertex_shader_source.c_str() : NULL;
93
+
94
+ auto env = make_env(builtin_variable_names, ignore_no_uniform_location_error);
95
+ if (env)
96
+ *THIS = Rays::Shader(fs, vs, *env);
97
+ else
98
+ *THIS = Rays::Shader(fs, vs);
27
99
  }
28
100
  RUCY_END
29
101
 
@@ -33,9 +105,6 @@ RUCY_DEFN(set_uniform)
33
105
  CHECK;
34
106
  check_arg_count(__FILE__, __LINE__, "Painter#set_uniform", argc, 2, 3, 4, 5);
35
107
 
36
- #define Ai(n) (argv[n].as_i())
37
- #define Af(n) ((float) argv[n].as_f())
38
-
39
108
  const char* name = argv[0].c_str();
40
109
  if (argv[1].is_array())
41
110
  {
@@ -48,6 +117,9 @@ RUCY_DEFN(set_uniform)
48
117
  argv += 1;
49
118
  }
50
119
 
120
+ #define Ai(n) (argv[n].as_i())
121
+ #define Af(n) ((float) argv[n].as_f())
122
+
51
123
  if (argv[0].is_i())
52
124
  {
53
125
  switch (argc)
@@ -68,6 +140,8 @@ RUCY_DEFN(set_uniform)
68
140
  case 4: THIS->set_uniform(name, Af(0), Af(1), Af(2), Af(3)); break;
69
141
  }
70
142
  }
143
+ else if (argv[0].is_kind_of(Rays::image_class()))
144
+ THIS->set_uniform(name, to<Rays::Image&>(argv[0]));
71
145
  else
72
146
  argument_error(__FILE__, __LINE__);
73
147
 
@@ -78,6 +152,26 @@ RUCY_DEFN(set_uniform)
78
152
  }
79
153
  RUCY_END
80
154
 
155
+ static
156
+ RUCY_DEF0(get_vertex_shader_source)
157
+ {
158
+ CHECK;
159
+
160
+ const char* source = THIS->vertex_shader_source();
161
+ return source ? value(source) : nil();
162
+ }
163
+ RUCY_END
164
+
165
+ static
166
+ RUCY_DEF0(get_fragment_shader_source)
167
+ {
168
+ CHECK;
169
+
170
+ const char* source = THIS->fragment_shader_source();
171
+ return source ? value(source) : nil();
172
+ }
173
+ RUCY_END
174
+
81
175
 
82
176
  static Class cShader;
83
177
 
@@ -90,6 +184,8 @@ Init_shader ()
90
184
  cShader.define_alloc_func(alloc);
91
185
  cShader.define_private_method("setup", setup);
92
186
  cShader.define_private_method("set_uniform", set_uniform);
187
+ cShader.define_method( "vertex_shader_source", get_vertex_shader_source);
188
+ cShader.define_method("fragment_shader_source", get_fragment_shader_source);
93
189
  }
94
190
 
95
191
 
@@ -26,6 +26,13 @@ namespace Rays
26
26
  };
27
27
 
28
28
 
29
+ class ShaderError : public OpenGLError
30
+ {
31
+ typedef OpenGLError Super;
32
+ public: ShaderError (const char* str = NULL);
33
+ };
34
+
35
+
29
36
  namespace ErrorFunctions
30
37
  {
31
38
 
@@ -39,6 +46,10 @@ namespace Rays
39
46
  void opengl_error (
40
47
  const char* file, int line, const char* format = NULL, ...);
41
48
 
49
+ [[noreturn]]
50
+ void shader_error (
51
+ const char* file, int line, const char* format = NULL, ...);
52
+
42
53
  }// ErrorFunctions
43
54
 
44
55
 
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_BITMAP_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/bitmap.h>
@@ -4,10 +4,8 @@
4
4
  #define __RAYS_RUBY_BOUNDS_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
- #include <rucy/exception.h>
11
9
  #include <rays/bounds.h>
12
10
  #include <rays/ruby/point.h>
13
11
 
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_CAMERA_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/camera.h>
@@ -4,10 +4,8 @@
4
4
  #define __RAYS_RUBY_COLOR_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
- #include <rucy/exception.h>
11
9
  #include <rays/color.h>
12
10
 
13
11
 
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_COLOR_SPACE_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/color_space.h>
@@ -0,0 +1,30 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __RAYS_RUBY_DEFS_H__
4
+ #define __RAYS_RUBY_DEFS_H__
5
+
6
+
7
+ #include <rucy/extension.h>
8
+ #include <rays/ruby/exception.h>
9
+
10
+
11
+ #define RAYS_CATCH \
12
+ } \
13
+ catch (const Rays::ShaderError& e) \
14
+ { \
15
+ RUCY_RAISE(Rays::shader_error_class(), e.what()); \
16
+ } \
17
+ catch (const Rays::OpenGLError& e) \
18
+ { \
19
+ RUCY_RAISE(Rays::opengl_error_class(), e.what()); \
20
+ } \
21
+ catch (const Rays::RaysError& e) \
22
+ { \
23
+ RUCY_RAISE(Rays::rays_error_class(), e.what());
24
+
25
+ #define RUCY_END \
26
+ RAYS_CATCH \
27
+ RUCY_DEF_END
28
+
29
+
30
+ #endif//EOH
@@ -0,0 +1,28 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __RAYS_RUBY_EXCEPTION_H__
4
+ #define __RAYS_RUBY_EXCEPTION_H__
5
+
6
+
7
+ #include <rucy/class.h>
8
+ #include <rays/exception.h>
9
+
10
+
11
+ namespace Rays
12
+ {
13
+
14
+
15
+ Rucy::Class rays_error_class ();
16
+ // class Rays::RaysError
17
+
18
+ Rucy::Class opengl_error_class ();
19
+ // class Rays::OpenGLError
20
+
21
+ Rucy::Class shader_error_class ();
22
+ // class Rays::ShaderError
23
+
24
+
25
+ }// Rays
26
+
27
+
28
+ #endif//EOH
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_FONT_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/font.h>
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_IMAGE_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/image.h>
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_MATRIX_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/matrix.h>
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_PAINTER_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/painter.h>
@@ -4,10 +4,8 @@
4
4
  #define __RAYS_RUBY_POINT_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
- #include <rucy/exception.h>
11
9
  #include <rays/point.h>
12
10
 
13
11
 
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_POLYGON_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/polygon.h>
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_POLYLINE_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/polyline.h>
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_RAYS_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/module.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/rays.h>
@@ -4,7 +4,6 @@
4
4
  #define __RAYS_RUBY_SHADER_H__
5
5
 
6
6
 
7
- #include <rucy/rucy.h>
8
7
  #include <rucy/class.h>
9
8
  #include <rucy/extension.h>
10
9
  #include <rays/shader.h>
data/include/rays/ruby.h CHANGED
@@ -5,6 +5,8 @@
5
5
 
6
6
 
7
7
  #include <rays/ruby/rays.h>
8
+ #include <rays/ruby/defs.h>
9
+ #include <rays/ruby/exception.h>
8
10
 
9
11
  #include <rays/ruby/point.h>
10
12
  #include <rays/ruby/bounds.h>