ray 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/README.md +9 -6
  2. data/Rakefile +1 -5
  3. data/ext/audio.c +25 -19
  4. data/ext/audio_source.c +67 -39
  5. data/ext/color.c +19 -19
  6. data/ext/drawable.c +190 -31
  7. data/ext/extconf.rb +16 -14
  8. data/ext/gl.c +310 -30
  9. data/ext/gl_buffer.c +223 -2
  10. data/ext/gl_index_buffer.c +11 -0
  11. data/ext/gl_int_array.c +24 -22
  12. data/ext/gl_vertex.c +84 -49
  13. data/ext/image.c +115 -51
  14. data/ext/image_target.c +58 -10
  15. data/ext/input.c +73 -6
  16. data/ext/mo.c +583 -0
  17. data/ext/mo.h +189 -0
  18. data/ext/music.c +9 -8
  19. data/ext/pixel_bus.c +349 -0
  20. data/ext/polygon.c +68 -45
  21. data/ext/ray.c +1 -0
  22. data/ext/ray.h +19 -1
  23. data/ext/rect.c +9 -47
  24. data/ext/say.h +1 -2
  25. data/ext/say_all.h +6 -0
  26. data/ext/say_audio.h +3 -0
  27. data/ext/say_audio_context.c +1 -4
  28. data/ext/say_basic_type.c +24 -0
  29. data/ext/say_basic_type.h +4 -0
  30. data/ext/say_buffer.c +217 -88
  31. data/ext/say_buffer.h +20 -5
  32. data/ext/say_buffer_renderer.c +10 -7
  33. data/ext/say_buffer_renderer.h +1 -1
  34. data/ext/say_buffer_slice.c +70 -76
  35. data/ext/say_context.c +109 -22
  36. data/ext/say_context.h +14 -0
  37. data/ext/say_drawable.c +113 -25
  38. data/ext/say_drawable.h +23 -2
  39. data/ext/say_error.c +7 -2
  40. data/ext/say_font.c +30 -27
  41. data/ext/say_font.h +3 -6
  42. data/ext/say_get_proc.c +35 -0
  43. data/ext/say_image.c +102 -27
  44. data/ext/say_image.h +11 -4
  45. data/ext/say_image_target.c +88 -34
  46. data/ext/say_image_target.h +3 -2
  47. data/ext/say_index_buffer.c +31 -19
  48. data/ext/say_index_buffer.h +4 -2
  49. data/ext/say_index_buffer_slice.c +78 -70
  50. data/ext/say_music.c +4 -2
  51. data/ext/say_osx.h +3 -2
  52. data/ext/say_osx_context.h +37 -4
  53. data/ext/say_osx_window.h +32 -37
  54. data/ext/say_pixel_bus.c +163 -0
  55. data/ext/say_pixel_bus.h +44 -0
  56. data/ext/say_polygon.c +2 -2
  57. data/ext/say_shader.c +66 -62
  58. data/ext/say_shader.h +2 -0
  59. data/ext/say_sprite.c +1 -2
  60. data/ext/say_target.c +14 -23
  61. data/ext/say_target.h +3 -1
  62. data/ext/say_text.c +45 -7
  63. data/ext/say_text.h +12 -3
  64. data/ext/say_thread.c +13 -6
  65. data/ext/say_thread.h +1 -1
  66. data/ext/say_thread_variable.c +5 -5
  67. data/ext/say_vertex_type.c +79 -41
  68. data/ext/say_vertex_type.h +6 -2
  69. data/ext/say_view.c +10 -31
  70. data/ext/say_view.h +1 -5
  71. data/ext/say_win.h +2 -2
  72. data/ext/say_win_context.h +49 -11
  73. data/ext/say_win_window.h +30 -27
  74. data/ext/say_window.c +3 -3
  75. data/ext/say_x11.h +3 -1
  76. data/ext/say_x11_context.h +64 -10
  77. data/ext/say_x11_window.h +22 -17
  78. data/ext/shader.c +9 -0
  79. data/ext/sprite.c +7 -1
  80. data/ext/target.c +80 -28
  81. data/ext/text.c +43 -1
  82. data/ext/view.c +53 -1
  83. data/ext/window.c +4 -0
  84. data/lib/ray/animation_list.rb +17 -2
  85. data/lib/ray/audio_source.rb +11 -0
  86. data/lib/ray/color.rb +14 -0
  87. data/lib/ray/drawable.rb +23 -0
  88. data/lib/ray/dsl/event.rb +1 -9
  89. data/lib/ray/dsl/event_runner.rb +3 -4
  90. data/lib/ray/dsl/matcher.rb +20 -1
  91. data/lib/ray/effect.rb +116 -0
  92. data/lib/ray/effect/black_and_white.rb +38 -0
  93. data/lib/ray/effect/color_inversion.rb +16 -0
  94. data/lib/ray/effect/generator.rb +145 -0
  95. data/lib/ray/effect/grayscale.rb +32 -0
  96. data/lib/ray/game.rb +25 -5
  97. data/lib/ray/gl/vertex.rb +105 -26
  98. data/lib/ray/helper.rb +5 -0
  99. data/lib/ray/image.rb +54 -13
  100. data/lib/ray/image_target.rb +7 -0
  101. data/lib/ray/matrix.rb +26 -0
  102. data/lib/ray/music.rb +4 -0
  103. data/lib/ray/pixel_bus.rb +22 -0
  104. data/lib/ray/polygon.rb +17 -0
  105. data/lib/ray/pp.rb +28 -0
  106. data/lib/ray/ray.rb +7 -1
  107. data/lib/ray/rect.rb +7 -13
  108. data/lib/ray/scene.rb +24 -5
  109. data/lib/ray/scene_list.rb +9 -0
  110. data/lib/ray/shader.rb +11 -2
  111. data/lib/ray/sound.rb +4 -0
  112. data/lib/ray/sprite.rb +23 -62
  113. data/lib/ray/target.rb +25 -0
  114. data/lib/ray/text.rb +10 -0
  115. data/lib/ray/turtle.rb +9 -3
  116. data/lib/ray/vector.rb +18 -0
  117. data/lib/ray/vertex.rb +6 -0
  118. data/lib/ray/view.rb +22 -0
  119. data/samples/animation/sprite_motion.rb +0 -60
  120. data/samples/audio/{spacial.rb → spatial.rb} +1 -1
  121. data/samples/buffer/buffer.rb +1 -0
  122. data/samples/buffer/index_buffer.rb +2 -0
  123. data/samples/cptn_ruby/cptn_ruby.rb +6 -7
  124. data/samples/effects/effect.rb +39 -0
  125. data/samples/effects/grayscale.rb +27 -0
  126. data/samples/opengl/image.rb +7 -5
  127. data/samples/opengl/instancing.rb +159 -0
  128. data/samples/opengl/instancing.rbc +3231 -0
  129. data/samples/opengl/obj_loader.rb +9 -8
  130. data/samples/opengl/shader.rb +1 -3
  131. data/samples/shaders/geometry.rb +108 -38
  132. data/samples/shaders/geometry.rbc +2074 -0
  133. data/samples/shaders/shape.rb +2 -2
  134. data/samples/starfighter/starfighter.rb +5 -5
  135. data/samples/window/get_pixel.rb +1 -1
  136. data/test/animation_list_test.rb +18 -4
  137. data/test/drawable_test.rb +70 -1
  138. data/test/effect_generator_test.rb +63 -0
  139. data/test/effect_test.rb +61 -0
  140. data/test/game_test.rb +18 -0
  141. data/test/gl_buffer_test.rb +43 -1
  142. data/test/gl_index_buffer_test.rb +5 -0
  143. data/test/gl_vertex_test.rb +28 -1
  144. data/test/image_test.rb +5 -5
  145. data/test/input_test.rb +49 -0
  146. data/test/pixel_bus_test.rb +28 -0
  147. data/test/rect_test.rb +4 -0
  148. data/{samples/_media → test/res}/Beep.wav +0 -0
  149. data/samples/_media/CptnRuby Gem.png b/data/test/res/CptnRuby → Gem.png +0 -0
  150. data/samples/_media/CptnRuby Map.txt b/data/test/res/CptnRuby → Map.txt +0 -0
  151. data/samples/_media/CptnRuby Tileset.png b/data/test/res/CptnRuby → Tileset.png +0 -0
  152. data/{samples/_media → test/res}/CptnRuby.png +0 -0
  153. data/{samples/_media → test/res}/Space.png +0 -0
  154. data/{samples/_media → test/res}/Star.png +0 -0
  155. data/{samples/_media → test/res}/Starfighter.png +0 -0
  156. data/test/res/cube.obj +28 -0
  157. data/test/res/light3d.c +2 -2
  158. data/test/res/stone.png +0 -0
  159. data/test/scene_test.rb +3 -0
  160. data/test/sprite_test.rb +10 -0
  161. data/test/text_test.rb +31 -2
  162. data/test/view_test.rb +13 -1
  163. metadata +38 -17
  164. data/ext/say_array.c +0 -124
  165. data/ext/say_array.h +0 -34
  166. data/ext/say_table.c +0 -86
  167. data/ext/say_table.h +0 -24
@@ -45,17 +45,18 @@ class Model < Ray::Drawable
45
45
  end
46
46
 
47
47
  self.vertex_count = @vertices.size
48
- rotate(0, 0, 0)
48
+ self.matrix_proc = proc do # always called with self
49
+ mat = Ray::Matrix.translation [0, 0, -4]
50
+
51
+ mat.rotate(@x, [1, 0, 0])
52
+ mat.rotate(@y, [0, 1, 0])
53
+ mat.rotate(@z, [0, 0, 1])
54
+ end
49
55
  end
50
56
 
51
57
  def rotate(x, y, z)
52
- mat = Ray::Matrix.translation [0, 0, -4]
53
-
54
- mat.rotate(x, [1, 0, 0])
55
- mat.rotate(y, [0, 1, 0])
56
- mat.rotate(z, [0, 0, 1])
57
-
58
- self.matrix = mat
58
+ @x, @y, @z = x, y, z
59
+ matrix_changed!
59
60
  end
60
61
 
61
62
  def fill_vertices
@@ -17,7 +17,7 @@ class CustomDrawable < Ray::Drawable
17
17
  :frag => path_of("frag_gray.c"))
18
18
 
19
19
  @custom_shader["in_ModelView"] = Ray::Matrix.identity
20
-
20
+ @custom_shader["in_Projection"] = Ray::Matrix.identity
21
21
  end
22
22
 
23
23
  def fill_vertices
@@ -27,8 +27,6 @@ class CustomDrawable < Ray::Drawable
27
27
  end
28
28
 
29
29
  def render(vertex, index)
30
- @custom_shader["in_Projection"] = matrix
31
-
32
30
  @custom_shader.bind
33
31
  draw_arrays :triangles, vertex, 3
34
32
  end
@@ -1,24 +1,40 @@
1
1
  $:.unshift File.expand_path(File.dirname(__FILE__) + "/../../lib")
2
2
  $:.unshift File.expand_path(File.dirname(__FILE__) + "/../../ext")
3
3
 
4
+ def path_of(res)
5
+ File.expand_path(File.dirname(__FILE__) + "/../../test/res/#{res}")
6
+ end
7
+
4
8
  require 'ray'
5
9
 
6
- class Triangles < Ray::Drawable
7
- def initialize
8
- super
9
- self.vertex_count = 3
10
+ Ray::GL.core_profile = true
11
+ Ray::GL.major_version = 3
12
+ Ray::GL.minor_version = 2
13
+
14
+ class Sprites < Ray::Drawable
15
+ Radius = 300
16
+
17
+ def initialize(image)
18
+ super()
19
+
20
+ @image = image
21
+ self.vertex_count = 400
10
22
  end
11
23
 
12
24
  def fill_vertices
13
- [
14
- Ray::Vertex.new([0, 0], Ray::Color.red),
15
- Ray::Vertex.new([100, 0], Ray::Color.green),
16
- Ray::Vertex.new([100, 200], Ray::Color.blue),
17
- ]
25
+ Array.new(vertex_count) do
26
+ angle = rand * 2 * Math::PI
27
+ radius = Math.sqrt(rand) * Radius
28
+
29
+ pos = [Math.cos(angle) * radius, Math.sin(angle) * radius]
30
+ Ray::Vertex.new(pos,
31
+ Ray::Color.new(rand(256), rand(256), rand(256)))
32
+ end
18
33
  end
19
34
 
20
35
  def render(first, index)
21
- Ray::GL.draw_arrays :triangles, first, 3
36
+ @image.bind
37
+ Ray::GL.draw_arrays :points, first, vertex_count
22
38
  end
23
39
  end
24
40
 
@@ -26,28 +42,8 @@ Ray.game "Geometry shader" do
26
42
  register { add_hook :quit, method(:exit!) }
27
43
 
28
44
  scene :shader do
29
- @triangles = Triangles.new
30
-
31
- geometry = <<-geometry
32
- #version 150
33
-
34
- layout(triangles) in;
35
- layout(triangle_strip, max_vertices = 6) out;
36
-
37
- void main() {
38
- for(int i = 0; i < gl_in.length(); i++) {
39
- gl_Position = gl_in[i].gl_Position;
40
- EmitVertex();
41
- }
42
- EndPrimitive();
43
-
44
- for(int i = 0; i < gl_in.length(); i++) {
45
- gl_Position = gl_in[i].gl_Position + vec4(0.3, 0, 0, 0);
46
- EmitVertex();
47
- }
48
- EndPrimitive();
49
- }
50
- geometry
45
+ @sprites = Sprites.new image(path_of("stone.png"))
46
+ @sprites.pos = window.size / 2
51
47
 
52
48
  vertex = <<-vertex
53
49
  #version 150
@@ -59,15 +55,77 @@ in vec2 in_TexCoord;
59
55
  uniform mat4 in_ModelView;
60
56
  uniform mat4 in_Projection;
61
57
 
58
+ out vec4 geom_Color;
59
+ out vec2 geom_TexCoord;
60
+
61
+ void main() {
62
+ gl_Position = vec4(in_Vertex, 0, 1) * (in_ModelView * in_Projection);
63
+ geom_Color = in_Color;
64
+ geom_TexCoord = in_TexCoord;
65
+ }
66
+ vertex
67
+
68
+ geometry = <<-geometry
69
+ #version 150
70
+
71
+ layout(points) in;
72
+ layout(triangle_strip, max_vertices = 4) out;
73
+
74
+ in vec4 geom_Color[];
75
+ in vec2 geom_TexCoord[];
76
+
62
77
  out vec4 var_Color;
63
78
  out vec2 var_TexCoord;
64
79
 
80
+ uniform float square_size;
81
+
82
+ const float pixel_width = 1.0 / 640;
83
+ const float pixel_height = 1.0 / 480;
84
+
85
+ struct vertex {
86
+ vec4 pos;
87
+ vec4 color;
88
+ vec2 tex_coord;
89
+ };
90
+
91
+ void emit_vertex(vertex v) {
92
+ gl_Position = v.pos;
93
+ var_Color = v.color;
94
+ var_TexCoord = v.tex_coord;
95
+ EmitVertex();
96
+ }
97
+
65
98
  void main() {
66
- gl_Position = vec4(in_Vertex, 0, 1) * (in_ModelView * in_Projection);
67
- var_Color = in_Color;
68
- var_TexCoord = in_TexCoord;
99
+ float width = pixel_width * square_size / 2;
100
+ float height = pixel_height * square_size / 2;
101
+
102
+ vec4 position = gl_in[0].gl_Position;
103
+ vec4 color = geom_Color[0];
104
+
105
+ vertex vertices[4];
106
+
107
+ vertices[0].pos = position + vec4(-width, -height, 0, 0);
108
+ vertices[0].tex_coord = vec2(0, 0);
109
+ vertices[0].color = color;
110
+
111
+ vertices[1].pos = position + vec4(-width, +height, 0, 0);
112
+ vertices[1].tex_coord = vec2(0, 1);
113
+ vertices[1].color = color;
114
+
115
+ vertices[2].pos = position + vec4(+width, -height, 0, 0);
116
+ vertices[2].tex_coord = vec2(1, 0);
117
+ vertices[2].color = color;
118
+
119
+ vertices[3].pos = position + vec4(+width, +height, 0, 0);
120
+ vertices[3].tex_coord = vec2(1, 1);
121
+ vertices[3].color = color;
122
+
123
+ for (int i = 0; i < 4; i++)
124
+ emit_vertex(vertices[i]);
125
+ EndPrimitive();
69
126
  }
70
- vertex
127
+ geometry
128
+
71
129
 
72
130
  frag = <<-frag
73
131
  #version 150
@@ -81,7 +139,7 @@ in vec2 var_TexCoord;
81
139
  out vec4 out_FragColor;
82
140
 
83
141
  void main() {
84
- out_FragColor = vec4(0, 1, 1, 1);
142
+ out_FragColor = var_Color * texture(in_Texture, var_TexCoord);
85
143
  }
86
144
  frag
87
145
 
@@ -89,8 +147,20 @@ frag
89
147
  :vertex => StringIO.new(vertex),
90
148
  :geometry => StringIO.new(geometry))
91
149
 
150
+ window.shader[:square_size] = @size = 15
151
+
152
+ always do
153
+ if holding? :+
154
+ window.shader[:square_size] = (@size += 3)
155
+ elsif holding? :-
156
+ window.shader[:square_size] = (@size -= 3)
157
+ end
158
+
159
+ @sprites.angle += 1.0
160
+ end
161
+
92
162
  render do |win|
93
- win.draw @triangles
163
+ win.draw @sprites
94
164
  end
95
165
  end
96
166
 
@@ -0,0 +1,2074 @@
1
+ !RBIX
2
+ 11985915524486876935
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 177
13
+ 99
14
+ 43
15
+ 0
16
+ 7
17
+ 1
18
+ 49
19
+ 2
20
+ 1
21
+ 45
22
+ 3
23
+ 4
24
+ 45
25
+ 3
26
+ 5
27
+ 65
28
+ 49
29
+ 6
30
+ 0
31
+ 49
32
+ 7
33
+ 1
34
+ 7
35
+ 8
36
+ 64
37
+ 81
38
+ 9
39
+ 49
40
+ 10
41
+ 1
42
+ 49
43
+ 11
44
+ 1
45
+ 15
46
+ 99
47
+ 43
48
+ 0
49
+ 7
50
+ 1
51
+ 49
52
+ 2
53
+ 1
54
+ 45
55
+ 3
56
+ 12
57
+ 45
58
+ 3
59
+ 13
60
+ 65
61
+ 49
62
+ 6
63
+ 0
64
+ 49
65
+ 7
66
+ 1
67
+ 7
68
+ 14
69
+ 64
70
+ 81
71
+ 9
72
+ 49
73
+ 10
74
+ 1
75
+ 49
76
+ 11
77
+ 1
78
+ 15
79
+ 99
80
+ 7
81
+ 15
82
+ 7
83
+ 16
84
+ 65
85
+ 67
86
+ 49
87
+ 17
88
+ 0
89
+ 49
90
+ 18
91
+ 4
92
+ 15
93
+ 5
94
+ 7
95
+ 19
96
+ 64
97
+ 47
98
+ 49
99
+ 20
100
+ 1
101
+ 15
102
+ 45
103
+ 21
104
+ 22
105
+ 43
106
+ 23
107
+ 2
108
+ 13
109
+ 18
110
+ 2
111
+ 49
112
+ 24
113
+ 1
114
+ 15
115
+ 15
116
+ 45
117
+ 21
118
+ 25
119
+ 43
120
+ 23
121
+ 4
122
+ 3
123
+ 13
124
+ 18
125
+ 2
126
+ 49
127
+ 26
128
+ 1
129
+ 15
130
+ 15
131
+ 45
132
+ 21
133
+ 27
134
+ 43
135
+ 23
136
+ 80
137
+ 13
138
+ 18
139
+ 2
140
+ 49
141
+ 28
142
+ 1
143
+ 15
144
+ 15
145
+ 99
146
+ 7
147
+ 29
148
+ 45
149
+ 21
150
+ 30
151
+ 43
152
+ 31
153
+ 65
154
+ 49
155
+ 32
156
+ 3
157
+ 13
158
+ 99
159
+ 12
160
+ 7
161
+ 33
162
+ 12
163
+ 7
164
+ 34
165
+ 12
166
+ 65
167
+ 12
168
+ 49
169
+ 35
170
+ 4
171
+ 15
172
+ 49
173
+ 33
174
+ 0
175
+ 15
176
+ 45
177
+ 21
178
+ 36
179
+ 7
180
+ 37
181
+ 64
182
+ 56
183
+ 38
184
+ 50
185
+ 39
186
+ 1
187
+ 15
188
+ 2
189
+ 11
190
+ I
191
+ 6
192
+ I
193
+ 0
194
+ I
195
+ 0
196
+ I
197
+ 0
198
+ n
199
+ p
200
+ 40
201
+ x
202
+ 7
203
+ Globals
204
+ x
205
+ 2
206
+ $:
207
+ x
208
+ 2
209
+ []
210
+ x
211
+ 4
212
+ File
213
+ n
214
+ n
215
+ x
216
+ 11
217
+ active_path
218
+ x
219
+ 7
220
+ dirname
221
+ s
222
+ 10
223
+ /../../lib
224
+ x
225
+ 1
226
+ +
227
+ x
228
+ 11
229
+ expand_path
230
+ x
231
+ 7
232
+ unshift
233
+ n
234
+ n
235
+ s
236
+ 10
237
+ /../../ext
238
+ x
239
+ 7
240
+ path_of
241
+ M
242
+ 1
243
+ n
244
+ n
245
+ x
246
+ 7
247
+ path_of
248
+ i
249
+ 28
250
+ 45
251
+ 0
252
+ 1
253
+ 45
254
+ 0
255
+ 2
256
+ 65
257
+ 49
258
+ 3
259
+ 0
260
+ 49
261
+ 4
262
+ 1
263
+ 7
264
+ 5
265
+ 20
266
+ 0
267
+ 47
268
+ 101
269
+ 6
270
+ 63
271
+ 2
272
+ 81
273
+ 7
274
+ 49
275
+ 8
276
+ 1
277
+ 11
278
+ I
279
+ 5
280
+ I
281
+ 1
282
+ I
283
+ 1
284
+ I
285
+ 1
286
+ n
287
+ p
288
+ 9
289
+ x
290
+ 4
291
+ File
292
+ n
293
+ n
294
+ x
295
+ 11
296
+ active_path
297
+ x
298
+ 7
299
+ dirname
300
+ s
301
+ 16
302
+ /../../test/res/
303
+ x
304
+ 4
305
+ to_s
306
+ x
307
+ 1
308
+ +
309
+ x
310
+ 11
311
+ expand_path
312
+ p
313
+ 5
314
+ I
315
+ -1
316
+ I
317
+ 4
318
+ I
319
+ 0
320
+ I
321
+ 5
322
+ I
323
+ 1c
324
+ x
325
+ 49
326
+ /home/kilian/code/ray/samples/shaders/geometry.rb
327
+ p
328
+ 1
329
+ x
330
+ 3
331
+ res
332
+ x
333
+ 17
334
+ method_visibility
335
+ x
336
+ 15
337
+ add_defn_method
338
+ s
339
+ 3
340
+ ray
341
+ x
342
+ 7
343
+ require
344
+ x
345
+ 3
346
+ Ray
347
+ n
348
+ x
349
+ 2
350
+ GL
351
+ x
352
+ 13
353
+ core_profile=
354
+ n
355
+ x
356
+ 14
357
+ major_version=
358
+ n
359
+ x
360
+ 14
361
+ minor_version=
362
+ x
363
+ 7
364
+ Sprites
365
+ n
366
+ x
367
+ 8
368
+ Drawable
369
+ x
370
+ 10
371
+ open_class
372
+ x
373
+ 14
374
+ __class_init__
375
+ M
376
+ 1
377
+ n
378
+ n
379
+ x
380
+ 7
381
+ Sprites
382
+ i
383
+ 53
384
+ 5
385
+ 66
386
+ 65
387
+ 7
388
+ 0
389
+ 7
390
+ 1
391
+ 49
392
+ 2
393
+ 2
394
+ 15
395
+ 99
396
+ 7
397
+ 3
398
+ 7
399
+ 4
400
+ 65
401
+ 67
402
+ 49
403
+ 5
404
+ 0
405
+ 49
406
+ 6
407
+ 4
408
+ 15
409
+ 99
410
+ 7
411
+ 7
412
+ 7
413
+ 8
414
+ 65
415
+ 67
416
+ 49
417
+ 5
418
+ 0
419
+ 49
420
+ 6
421
+ 4
422
+ 15
423
+ 99
424
+ 7
425
+ 9
426
+ 7
427
+ 10
428
+ 65
429
+ 67
430
+ 49
431
+ 5
432
+ 0
433
+ 49
434
+ 6
435
+ 4
436
+ 11
437
+ I
438
+ 5
439
+ I
440
+ 0
441
+ I
442
+ 0
443
+ I
444
+ 0
445
+ n
446
+ p
447
+ 11
448
+ x
449
+ 6
450
+ Radius
451
+ I
452
+ 12c
453
+ x
454
+ 9
455
+ const_set
456
+ x
457
+ 10
458
+ initialize
459
+ M
460
+ 1
461
+ n
462
+ n
463
+ x
464
+ 10
465
+ initialize
466
+ i
467
+ 22
468
+ 54
469
+ 52
470
+ 0
471
+ 0
472
+ 15
473
+ 20
474
+ 0
475
+ 38
476
+ 1
477
+ 15
478
+ 5
479
+ 7
480
+ 2
481
+ 13
482
+ 18
483
+ 2
484
+ 47
485
+ 49
486
+ 3
487
+ 1
488
+ 15
489
+ 11
490
+ I
491
+ 4
492
+ I
493
+ 1
494
+ I
495
+ 1
496
+ I
497
+ 1
498
+ n
499
+ p
500
+ 4
501
+ x
502
+ 10
503
+ initialize
504
+ x
505
+ 6
506
+ @image
507
+ I
508
+ 190
509
+ x
510
+ 13
511
+ vertex_count=
512
+ p
513
+ 11
514
+ I
515
+ -1
516
+ I
517
+ 11
518
+ I
519
+ 0
520
+ I
521
+ 12
522
+ I
523
+ 5
524
+ I
525
+ 14
526
+ I
527
+ a
528
+ I
529
+ a8
530
+ I
531
+ b
532
+ I
533
+ 15
534
+ I
535
+ 16
536
+ x
537
+ 49
538
+ /home/kilian/code/ray/samples/shaders/geometry.rb
539
+ p
540
+ 1
541
+ x
542
+ 5
543
+ image
544
+ x
545
+ 17
546
+ method_visibility
547
+ x
548
+ 15
549
+ add_defn_method
550
+ x
551
+ 13
552
+ fill_vertices
553
+ M
554
+ 1
555
+ n
556
+ n
557
+ x
558
+ 13
559
+ fill_vertices
560
+ i
561
+ 12
562
+ 45
563
+ 0
564
+ 1
565
+ 5
566
+ 48
567
+ 2
568
+ 56
569
+ 3
570
+ 50
571
+ 4
572
+ 1
573
+ 11
574
+ I
575
+ 3
576
+ I
577
+ 0
578
+ I
579
+ 0
580
+ I
581
+ 0
582
+ n
583
+ p
584
+ 5
585
+ x
586
+ 5
587
+ Array
588
+ n
589
+ x
590
+ 12
591
+ vertex_count
592
+ M
593
+ 1
594
+ p
595
+ 2
596
+ x
597
+ 9
598
+ for_block
599
+ t
600
+ n
601
+ x
602
+ 13
603
+ fill_vertices
604
+ i
605
+ 234
606
+ 5
607
+ 48
608
+ 0
609
+ 80
610
+ 49
611
+ 1
612
+ 1
613
+ 45
614
+ 2
615
+ 3
616
+ 43
617
+ 4
618
+ 49
619
+ 1
620
+ 1
621
+ 19
622
+ 0
623
+ 15
624
+ 45
625
+ 2
626
+ 5
627
+ 5
628
+ 48
629
+ 0
630
+ 49
631
+ 6
632
+ 1
633
+ 45
634
+ 7
635
+ 8
636
+ 49
637
+ 1
638
+ 1
639
+ 19
640
+ 1
641
+ 15
642
+ 45
643
+ 2
644
+ 9
645
+ 20
646
+ 0
647
+ 49
648
+ 10
649
+ 1
650
+ 20
651
+ 1
652
+ 49
653
+ 1
654
+ 1
655
+ 45
656
+ 2
657
+ 11
658
+ 20
659
+ 0
660
+ 49
661
+ 12
662
+ 1
663
+ 20
664
+ 1
665
+ 49
666
+ 1
667
+ 1
668
+ 35
669
+ 2
670
+ 19
671
+ 2
672
+ 15
673
+ 45
674
+ 13
675
+ 14
676
+ 43
677
+ 15
678
+ 13
679
+ 71
680
+ 16
681
+ 47
682
+ 9
683
+ 160
684
+ 47
685
+ 49
686
+ 17
687
+ 0
688
+ 13
689
+ 20
690
+ 2
691
+ 45
692
+ 13
693
+ 18
694
+ 43
695
+ 19
696
+ 13
697
+ 71
698
+ 16
699
+ 47
700
+ 9
701
+ 129
702
+ 47
703
+ 49
704
+ 17
705
+ 0
706
+ 13
707
+ 5
708
+ 7
709
+ 20
710
+ 47
711
+ 49
712
+ 0
713
+ 1
714
+ 5
715
+ 7
716
+ 20
717
+ 47
718
+ 49
719
+ 0
720
+ 1
721
+ 5
722
+ 7
723
+ 20
724
+ 47
725
+ 49
726
+ 0
727
+ 1
728
+ 47
729
+ 49
730
+ 21
731
+ 3
732
+ 15
733
+ 8
734
+ 153
735
+ 5
736
+ 7
737
+ 20
738
+ 47
739
+ 49
740
+ 0
741
+ 1
742
+ 5
743
+ 7
744
+ 20
745
+ 47
746
+ 49
747
+ 0
748
+ 1
749
+ 5
750
+ 7
751
+ 20
752
+ 47
753
+ 49
754
+ 0
755
+ 1
756
+ 49
757
+ 16
758
+ 3
759
+ 47
760
+ 49
761
+ 21
762
+ 2
763
+ 15
764
+ 8
765
+ 233
766
+ 20
767
+ 2
768
+ 45
769
+ 13
770
+ 22
771
+ 43
772
+ 19
773
+ 13
774
+ 71
775
+ 16
776
+ 47
777
+ 9
778
+ 206
779
+ 47
780
+ 49
781
+ 17
782
+ 0
783
+ 13
784
+ 5
785
+ 7
786
+ 20
787
+ 47
788
+ 49
789
+ 0
790
+ 1
791
+ 5
792
+ 7
793
+ 20
794
+ 47
795
+ 49
796
+ 0
797
+ 1
798
+ 5
799
+ 7
800
+ 20
801
+ 47
802
+ 49
803
+ 0
804
+ 1
805
+ 47
806
+ 49
807
+ 21
808
+ 3
809
+ 15
810
+ 8
811
+ 230
812
+ 5
813
+ 7
814
+ 20
815
+ 47
816
+ 49
817
+ 0
818
+ 1
819
+ 5
820
+ 7
821
+ 20
822
+ 47
823
+ 49
824
+ 0
825
+ 1
826
+ 5
827
+ 7
828
+ 20
829
+ 47
830
+ 49
831
+ 0
832
+ 1
833
+ 49
834
+ 16
835
+ 3
836
+ 49
837
+ 16
838
+ 2
839
+ 11
840
+ I
841
+ d
842
+ I
843
+ 3
844
+ I
845
+ 0
846
+ I
847
+ 0
848
+ I
849
+ -2
850
+ p
851
+ 23
852
+ x
853
+ 4
854
+ rand
855
+ x
856
+ 1
857
+ *
858
+ x
859
+ 4
860
+ Math
861
+ n
862
+ x
863
+ 2
864
+ PI
865
+ n
866
+ x
867
+ 4
868
+ sqrt
869
+ x
870
+ 6
871
+ Radius
872
+ n
873
+ n
874
+ x
875
+ 3
876
+ cos
877
+ n
878
+ x
879
+ 3
880
+ sin
881
+ x
882
+ 3
883
+ Ray
884
+ n
885
+ x
886
+ 6
887
+ Vertex
888
+ x
889
+ 3
890
+ new
891
+ x
892
+ 8
893
+ allocate
894
+ n
895
+ x
896
+ 5
897
+ Color
898
+ I
899
+ 100
900
+ x
901
+ 10
902
+ initialize
903
+ n
904
+ p
905
+ 15
906
+ I
907
+ 0
908
+ I
909
+ 1a
910
+ I
911
+ 12
912
+ I
913
+ 1b
914
+ I
915
+ 24
916
+ I
917
+ 1d
918
+ I
919
+ 43
920
+ I
921
+ 1e
922
+ I
923
+ 55
924
+ I
925
+ 1f
926
+ I
927
+ a0
928
+ I
929
+ 1e
930
+ I
931
+ a2
932
+ I
933
+ 1f
934
+ I
935
+ ea
936
+ x
937
+ 49
938
+ /home/kilian/code/ray/samples/shaders/geometry.rb
939
+ p
940
+ 3
941
+ x
942
+ 5
943
+ angle
944
+ x
945
+ 6
946
+ radius
947
+ x
948
+ 3
949
+ pos
950
+ x
951
+ 3
952
+ new
953
+ p
954
+ 5
955
+ I
956
+ -1
957
+ I
958
+ 18
959
+ I
960
+ 0
961
+ I
962
+ 19
963
+ I
964
+ c
965
+ x
966
+ 49
967
+ /home/kilian/code/ray/samples/shaders/geometry.rb
968
+ p
969
+ 0
970
+ x
971
+ 6
972
+ render
973
+ M
974
+ 1
975
+ n
976
+ n
977
+ x
978
+ 6
979
+ render
980
+ i
981
+ 22
982
+ 39
983
+ 0
984
+ 49
985
+ 1
986
+ 0
987
+ 15
988
+ 45
989
+ 2
990
+ 3
991
+ 43
992
+ 4
993
+ 7
994
+ 5
995
+ 20
996
+ 0
997
+ 5
998
+ 48
999
+ 6
1000
+ 49
1001
+ 7
1002
+ 3
1003
+ 11
1004
+ I
1005
+ 6
1006
+ I
1007
+ 2
1008
+ I
1009
+ 2
1010
+ I
1011
+ 2
1012
+ n
1013
+ p
1014
+ 8
1015
+ x
1016
+ 6
1017
+ @image
1018
+ x
1019
+ 4
1020
+ bind
1021
+ x
1022
+ 3
1023
+ Ray
1024
+ n
1025
+ x
1026
+ 2
1027
+ GL
1028
+ x
1029
+ 6
1030
+ points
1031
+ x
1032
+ 12
1033
+ vertex_count
1034
+ x
1035
+ 11
1036
+ draw_arrays
1037
+ p
1038
+ 7
1039
+ I
1040
+ -1
1041
+ I
1042
+ 23
1043
+ I
1044
+ 0
1045
+ I
1046
+ 24
1047
+ I
1048
+ 6
1049
+ I
1050
+ 25
1051
+ I
1052
+ 16
1053
+ x
1054
+ 49
1055
+ /home/kilian/code/ray/samples/shaders/geometry.rb
1056
+ p
1057
+ 2
1058
+ x
1059
+ 5
1060
+ first
1061
+ x
1062
+ 5
1063
+ index
1064
+ p
1065
+ 9
1066
+ I
1067
+ 2
1068
+ I
1069
+ f
1070
+ I
1071
+ b
1072
+ I
1073
+ 11
1074
+ I
1075
+ 19
1076
+ I
1077
+ 18
1078
+ I
1079
+ 27
1080
+ I
1081
+ 23
1082
+ I
1083
+ 35
1084
+ x
1085
+ 49
1086
+ /home/kilian/code/ray/samples/shaders/geometry.rb
1087
+ p
1088
+ 0
1089
+ x
1090
+ 13
1091
+ attach_method
1092
+ n
1093
+ s
1094
+ 15
1095
+ Geometry shader
1096
+ M
1097
+ 1
1098
+ p
1099
+ 2
1100
+ x
1101
+ 9
1102
+ for_block
1103
+ t
1104
+ n
1105
+ x
1106
+ 9
1107
+ __block__
1108
+ i
1109
+ 27
1110
+ 5
1111
+ 56
1112
+ 0
1113
+ 47
1114
+ 50
1115
+ 1
1116
+ 0
1117
+ 15
1118
+ 5
1119
+ 7
1120
+ 2
1121
+ 56
1122
+ 3
1123
+ 47
1124
+ 50
1125
+ 4
1126
+ 1
1127
+ 15
1128
+ 5
1129
+ 48
1130
+ 5
1131
+ 7
1132
+ 2
1133
+ 49
1134
+ 6
1135
+ 1
1136
+ 11
1137
+ I
1138
+ 4
1139
+ I
1140
+ 0
1141
+ I
1142
+ 0
1143
+ I
1144
+ 0
1145
+ I
1146
+ -2
1147
+ p
1148
+ 7
1149
+ M
1150
+ 1
1151
+ p
1152
+ 2
1153
+ x
1154
+ 9
1155
+ for_block
1156
+ t
1157
+ n
1158
+ x
1159
+ 9
1160
+ __block__
1161
+ i
1162
+ 15
1163
+ 5
1164
+ 7
1165
+ 0
1166
+ 5
1167
+ 7
1168
+ 1
1169
+ 47
1170
+ 49
1171
+ 2
1172
+ 1
1173
+ 47
1174
+ 49
1175
+ 3
1176
+ 2
1177
+ 11
1178
+ I
1179
+ 5
1180
+ I
1181
+ 0
1182
+ I
1183
+ 0
1184
+ I
1185
+ 0
1186
+ I
1187
+ -2
1188
+ p
1189
+ 4
1190
+ x
1191
+ 4
1192
+ quit
1193
+ x
1194
+ 5
1195
+ exit!
1196
+ x
1197
+ 6
1198
+ method
1199
+ x
1200
+ 8
1201
+ add_hook
1202
+ p
1203
+ 3
1204
+ I
1205
+ 0
1206
+ I
1207
+ 2a
1208
+ I
1209
+ f
1210
+ x
1211
+ 49
1212
+ /home/kilian/code/ray/samples/shaders/geometry.rb
1213
+ p
1214
+ 0
1215
+ x
1216
+ 8
1217
+ register
1218
+ x
1219
+ 6
1220
+ shader
1221
+ M
1222
+ 1
1223
+ p
1224
+ 2
1225
+ x
1226
+ 9
1227
+ for_block
1228
+ t
1229
+ n
1230
+ x
1231
+ 9
1232
+ __block__
1233
+ i
1234
+ 250
1235
+ 45
1236
+ 0
1237
+ 1
1238
+ 13
1239
+ 71
1240
+ 2
1241
+ 47
1242
+ 9
1243
+ 34
1244
+ 47
1245
+ 49
1246
+ 3
1247
+ 0
1248
+ 13
1249
+ 5
1250
+ 5
1251
+ 7
1252
+ 4
1253
+ 64
1254
+ 47
1255
+ 49
1256
+ 5
1257
+ 1
1258
+ 47
1259
+ 49
1260
+ 6
1261
+ 1
1262
+ 47
1263
+ 49
1264
+ 7
1265
+ 1
1266
+ 15
1267
+ 8
1268
+ 50
1269
+ 5
1270
+ 5
1271
+ 7
1272
+ 4
1273
+ 64
1274
+ 47
1275
+ 49
1276
+ 5
1277
+ 1
1278
+ 47
1279
+ 49
1280
+ 6
1281
+ 1
1282
+ 49
1283
+ 2
1284
+ 1
1285
+ 38
1286
+ 8
1287
+ 15
1288
+ 39
1289
+ 8
1290
+ 5
1291
+ 48
1292
+ 9
1293
+ 49
1294
+ 10
1295
+ 0
1296
+ 80
1297
+ 49
1298
+ 11
1299
+ 1
1300
+ 13
1301
+ 18
1302
+ 2
1303
+ 49
1304
+ 12
1305
+ 1
1306
+ 15
1307
+ 15
1308
+ 7
1309
+ 13
1310
+ 64
1311
+ 19
1312
+ 0
1313
+ 15
1314
+ 7
1315
+ 14
1316
+ 64
1317
+ 19
1318
+ 1
1319
+ 15
1320
+ 7
1321
+ 15
1322
+ 64
1323
+ 19
1324
+ 2
1325
+ 15
1326
+ 5
1327
+ 48
1328
+ 9
1329
+ 49
1330
+ 16
1331
+ 0
1332
+ 44
1333
+ 43
1334
+ 17
1335
+ 4
1336
+ 3
1337
+ 49
1338
+ 18
1339
+ 1
1340
+ 13
1341
+ 7
1342
+ 19
1343
+ 45
1344
+ 20
1345
+ 21
1346
+ 13
1347
+ 71
1348
+ 2
1349
+ 47
1350
+ 9
1351
+ 131
1352
+ 47
1353
+ 49
1354
+ 3
1355
+ 0
1356
+ 13
1357
+ 20
1358
+ 2
1359
+ 47
1360
+ 49
1361
+ 7
1362
+ 1
1363
+ 15
1364
+ 8
1365
+ 136
1366
+ 20
1367
+ 2
1368
+ 49
1369
+ 2
1370
+ 1
1371
+ 49
1372
+ 22
1373
+ 2
1374
+ 15
1375
+ 13
1376
+ 7
1377
+ 23
1378
+ 45
1379
+ 20
1380
+ 24
1381
+ 13
1382
+ 71
1383
+ 2
1384
+ 47
1385
+ 9
1386
+ 166
1387
+ 47
1388
+ 49
1389
+ 3
1390
+ 0
1391
+ 13
1392
+ 20
1393
+ 0
1394
+ 47
1395
+ 49
1396
+ 7
1397
+ 1
1398
+ 15
1399
+ 8
1400
+ 171
1401
+ 20
1402
+ 0
1403
+ 49
1404
+ 2
1405
+ 1
1406
+ 49
1407
+ 22
1408
+ 2
1409
+ 15
1410
+ 13
1411
+ 7
1412
+ 25
1413
+ 45
1414
+ 20
1415
+ 26
1416
+ 13
1417
+ 71
1418
+ 2
1419
+ 47
1420
+ 9
1421
+ 201
1422
+ 47
1423
+ 49
1424
+ 3
1425
+ 0
1426
+ 13
1427
+ 20
1428
+ 1
1429
+ 47
1430
+ 49
1431
+ 7
1432
+ 1
1433
+ 15
1434
+ 8
1435
+ 206
1436
+ 20
1437
+ 1
1438
+ 49
1439
+ 2
1440
+ 1
1441
+ 49
1442
+ 22
1443
+ 2
1444
+ 15
1445
+ 49
1446
+ 27
1447
+ 1
1448
+ 15
1449
+ 5
1450
+ 48
1451
+ 9
1452
+ 49
1453
+ 16
1454
+ 0
1455
+ 7
1456
+ 28
1457
+ 4
1458
+ 15
1459
+ 38
1460
+ 29
1461
+ 13
1462
+ 18
1463
+ 3
1464
+ 49
1465
+ 22
1466
+ 2
1467
+ 15
1468
+ 15
1469
+ 5
1470
+ 56
1471
+ 30
1472
+ 47
1473
+ 50
1474
+ 31
1475
+ 0
1476
+ 15
1477
+ 5
1478
+ 56
1479
+ 32
1480
+ 47
1481
+ 50
1482
+ 33
1483
+ 0
1484
+ 11
1485
+ I
1486
+ b
1487
+ I
1488
+ 3
1489
+ I
1490
+ 0
1491
+ I
1492
+ 0
1493
+ I
1494
+ -2
1495
+ p
1496
+ 34
1497
+ x
1498
+ 7
1499
+ Sprites
1500
+ n
1501
+ x
1502
+ 3
1503
+ new
1504
+ x
1505
+ 8
1506
+ allocate
1507
+ s
1508
+ 9
1509
+ stone.png
1510
+ x
1511
+ 7
1512
+ path_of
1513
+ x
1514
+ 5
1515
+ image
1516
+ x
1517
+ 10
1518
+ initialize
1519
+ x
1520
+ 8
1521
+ @sprites
1522
+ x
1523
+ 6
1524
+ window
1525
+ x
1526
+ 4
1527
+ size
1528
+ x
1529
+ 1
1530
+ /
1531
+ x
1532
+ 4
1533
+ pos=
1534
+ s
1535
+ 324
1536
+ #version 150
1537
+
1538
+ in vec2 in_Vertex;
1539
+ in vec4 in_Color;
1540
+ in vec2 in_TexCoord;
1541
+
1542
+ uniform mat4 in_ModelView;
1543
+ uniform mat4 in_Projection;
1544
+
1545
+ out vec4 geom_Color;
1546
+ out vec2 geom_TexCoord;
1547
+
1548
+ void main() {
1549
+ gl_Position = vec4(in_Vertex, 0, 1) * (in_ModelView * in_Projection);
1550
+ geom_Color = in_Color;
1551
+ geom_TexCoord = in_TexCoord;
1552
+ }
1553
+
1554
+ s
1555
+ 1311
1556
+ #version 150
1557
+
1558
+ layout(points) in;
1559
+ layout(triangle_strip, max_vertices = 4) out;
1560
+
1561
+ in vec4 geom_Color[];
1562
+ in vec2 geom_TexCoord[];
1563
+
1564
+ out vec4 var_Color;
1565
+ out vec2 var_TexCoord;
1566
+
1567
+ uniform float square_size;
1568
+
1569
+ const float pixel_width = 1.0 / 640;
1570
+ const float pixel_height = 1.0 / 480;
1571
+
1572
+ struct vertex {
1573
+ vec4 pos;
1574
+ vec4 color;
1575
+ vec2 tex_coord;
1576
+ };
1577
+
1578
+ void emit_vertex(vertex v) {
1579
+ gl_Position = v.pos;
1580
+ var_Color = v.color;
1581
+ var_TexCoord = v.tex_coord;
1582
+ EmitVertex();
1583
+ }
1584
+
1585
+ void main() {
1586
+ float width = pixel_width * square_size / 2;
1587
+ float height = pixel_height * square_size / 2;
1588
+
1589
+ vec4 position = gl_in[0].gl_Position;
1590
+ vec4 color = geom_Color[0];
1591
+
1592
+ vertex vertices[4];
1593
+
1594
+ vertices[0].pos = position + vec4(-width, -height, 0, 0);
1595
+ vertices[0].tex_coord = vec2(0, 0);
1596
+ vertices[0].color = color;
1597
+
1598
+ vertices[1].pos = position + vec4(-width, +height, 0, 0);
1599
+ vertices[1].tex_coord = vec2(0, 1);
1600
+ vertices[1].color = color;
1601
+
1602
+ vertices[2].pos = position + vec4(+width, -height, 0, 0);
1603
+ vertices[2].tex_coord = vec2(1, 0);
1604
+ vertices[2].color = color;
1605
+
1606
+ vertices[3].pos = position + vec4(+width, +height, 0, 0);
1607
+ vertices[3].tex_coord = vec2(1, 1);
1608
+ vertices[3].color = color;
1609
+
1610
+ for (int i = 0; i < 4; i++)
1611
+ emit_vertex(vertices[i]);
1612
+ EndPrimitive();
1613
+ }
1614
+
1615
+ s
1616
+ 225
1617
+ #version 150
1618
+
1619
+ uniform sampler2D in_Texture;
1620
+ uniform bool in_TextureEnabled;
1621
+
1622
+ in vec4 var_Color;
1623
+ in vec2 var_TexCoord;
1624
+
1625
+ out vec4 out_FragColor;
1626
+
1627
+ void main() {
1628
+ out_FragColor = var_Color * texture(in_Texture, var_TexCoord);
1629
+ }
1630
+
1631
+ x
1632
+ 6
1633
+ shader
1634
+ x
1635
+ 4
1636
+ Hash
1637
+ x
1638
+ 16
1639
+ new_from_literal
1640
+ x
1641
+ 4
1642
+ frag
1643
+ x
1644
+ 8
1645
+ StringIO
1646
+ n
1647
+ x
1648
+ 3
1649
+ []=
1650
+ x
1651
+ 6
1652
+ vertex
1653
+ n
1654
+ x
1655
+ 8
1656
+ geometry
1657
+ n
1658
+ x
1659
+ 7
1660
+ compile
1661
+ x
1662
+ 11
1663
+ square_size
1664
+ x
1665
+ 5
1666
+ @size
1667
+ M
1668
+ 1
1669
+ p
1670
+ 2
1671
+ x
1672
+ 9
1673
+ for_block
1674
+ t
1675
+ n
1676
+ x
1677
+ 9
1678
+ __block__
1679
+ i
1680
+ 89
1681
+ 5
1682
+ 7
1683
+ 0
1684
+ 47
1685
+ 49
1686
+ 1
1687
+ 1
1688
+ 9
1689
+ 34
1690
+ 5
1691
+ 48
1692
+ 2
1693
+ 49
1694
+ 3
1695
+ 0
1696
+ 7
1697
+ 4
1698
+ 39
1699
+ 5
1700
+ 4
1701
+ 3
1702
+ 81
1703
+ 0
1704
+ 38
1705
+ 5
1706
+ 13
1707
+ 18
1708
+ 3
1709
+ 49
1710
+ 6
1711
+ 2
1712
+ 15
1713
+ 8
1714
+ 69
1715
+ 5
1716
+ 7
1717
+ 7
1718
+ 47
1719
+ 49
1720
+ 1
1721
+ 1
1722
+ 9
1723
+ 68
1724
+ 5
1725
+ 48
1726
+ 2
1727
+ 49
1728
+ 3
1729
+ 0
1730
+ 7
1731
+ 4
1732
+ 39
1733
+ 5
1734
+ 4
1735
+ 3
1736
+ 82
1737
+ 7
1738
+ 38
1739
+ 5
1740
+ 13
1741
+ 18
1742
+ 3
1743
+ 49
1744
+ 6
1745
+ 2
1746
+ 15
1747
+ 8
1748
+ 69
1749
+ 1
1750
+ 15
1751
+ 39
1752
+ 8
1753
+ 13
1754
+ 49
1755
+ 9
1756
+ 0
1757
+ 7
1758
+ 10
1759
+ 49
1760
+ 0
1761
+ 1
1762
+ 13
1763
+ 18
1764
+ 2
1765
+ 49
1766
+ 11
1767
+ 1
1768
+ 15
1769
+ 11
1770
+ I
1771
+ 5
1772
+ I
1773
+ 0
1774
+ I
1775
+ 0
1776
+ I
1777
+ 0
1778
+ I
1779
+ -2
1780
+ p
1781
+ 12
1782
+ x
1783
+ 1
1784
+ +
1785
+ x
1786
+ 8
1787
+ holding?
1788
+ x
1789
+ 6
1790
+ window
1791
+ x
1792
+ 6
1793
+ shader
1794
+ x
1795
+ 11
1796
+ square_size
1797
+ x
1798
+ 5
1799
+ @size
1800
+ x
1801
+ 3
1802
+ []=
1803
+ x
1804
+ 1
1805
+ -
1806
+ x
1807
+ 8
1808
+ @sprites
1809
+ x
1810
+ 5
1811
+ angle
1812
+ d
1813
+ +0.500000000000000000000000000000000000000000000000000000 1
1814
+ x
1815
+ 6
1816
+ angle=
1817
+ p
1818
+ 15
1819
+ I
1820
+ 0
1821
+ I
1822
+ 99
1823
+ I
1824
+ 9
1825
+ I
1826
+ 9a
1827
+ I
1828
+ 22
1829
+ I
1830
+ 9b
1831
+ I
1832
+ 2b
1833
+ I
1834
+ 9c
1835
+ I
1836
+ 44
1837
+ I
1838
+ 9b
1839
+ I
1840
+ 45
1841
+ I
1842
+ 0
1843
+ I
1844
+ 46
1845
+ I
1846
+ 9f
1847
+ I
1848
+ 59
1849
+ x
1850
+ 49
1851
+ /home/kilian/code/ray/samples/shaders/geometry.rb
1852
+ p
1853
+ 0
1854
+ x
1855
+ 6
1856
+ always
1857
+ M
1858
+ 1
1859
+ p
1860
+ 2
1861
+ x
1862
+ 9
1863
+ for_block
1864
+ t
1865
+ n
1866
+ x
1867
+ 9
1868
+ __block__
1869
+ i
1870
+ 12
1871
+ 57
1872
+ 19
1873
+ 0
1874
+ 15
1875
+ 20
1876
+ 0
1877
+ 39
1878
+ 0
1879
+ 49
1880
+ 1
1881
+ 1
1882
+ 11
1883
+ I
1884
+ 4
1885
+ I
1886
+ 1
1887
+ I
1888
+ 1
1889
+ I
1890
+ 1
1891
+ n
1892
+ p
1893
+ 2
1894
+ x
1895
+ 8
1896
+ @sprites
1897
+ x
1898
+ 4
1899
+ draw
1900
+ p
1901
+ 5
1902
+ I
1903
+ 0
1904
+ I
1905
+ a2
1906
+ I
1907
+ 4
1908
+ I
1909
+ a3
1910
+ I
1911
+ c
1912
+ x
1913
+ 49
1914
+ /home/kilian/code/ray/samples/shaders/geometry.rb
1915
+ p
1916
+ 1
1917
+ x
1918
+ 3
1919
+ win
1920
+ x
1921
+ 6
1922
+ render
1923
+ p
1924
+ 29
1925
+ I
1926
+ 0
1927
+ I
1928
+ 2d
1929
+ I
1930
+ 35
1931
+ I
1932
+ 2e
1933
+ I
1934
+ 49
1935
+ I
1936
+ 30
1937
+ I
1938
+ 4f
1939
+ I
1940
+ 44
1941
+ I
1942
+ 55
1943
+ I
1944
+ 82
1945
+ I
1946
+ 5b
1947
+ I
1948
+ 92
1949
+ I
1950
+ 61
1951
+ I
1952
+ 94
1953
+ I
1954
+ 6a
1955
+ I
1956
+ 92
1957
+ I
1958
+ 8d
1959
+ I
1960
+ 93
1961
+ I
1962
+ b0
1963
+ I
1964
+ 94
1965
+ I
1966
+ d2
1967
+ I
1968
+ 92
1969
+ I
1970
+ d6
1971
+ I
1972
+ 96
1973
+ I
1974
+ ea
1975
+ I
1976
+ 98
1977
+ I
1978
+ f2
1979
+ I
1980
+ a2
1981
+ I
1982
+ fa
1983
+ x
1984
+ 49
1985
+ /home/kilian/code/ray/samples/shaders/geometry.rb
1986
+ p
1987
+ 3
1988
+ x
1989
+ 6
1990
+ vertex
1991
+ x
1992
+ 8
1993
+ geometry
1994
+ x
1995
+ 4
1996
+ frag
1997
+ x
1998
+ 5
1999
+ scene
2000
+ x
2001
+ 6
2002
+ scenes
2003
+ x
2004
+ 2
2005
+ <<
2006
+ p
2007
+ 7
2008
+ I
2009
+ 0
2010
+ I
2011
+ 2a
2012
+ I
2013
+ 8
2014
+ I
2015
+ 2c
2016
+ I
2017
+ 12
2018
+ I
2019
+ a7
2020
+ I
2021
+ 1b
2022
+ x
2023
+ 49
2024
+ /home/kilian/code/ray/samples/shaders/geometry.rb
2025
+ p
2026
+ 0
2027
+ x
2028
+ 4
2029
+ game
2030
+ p
2031
+ 19
2032
+ I
2033
+ 0
2034
+ I
2035
+ 1
2036
+ I
2037
+ 21
2038
+ I
2039
+ 2
2040
+ I
2041
+ 42
2042
+ I
2043
+ 4
2044
+ I
2045
+ 50
2046
+ I
2047
+ 8
2048
+ I
2049
+ 59
2050
+ I
2051
+ a
2052
+ I
2053
+ 67
2054
+ I
2055
+ b
2056
+ I
2057
+ 76
2058
+ I
2059
+ c
2060
+ I
2061
+ 84
2062
+ I
2063
+ e
2064
+ I
2065
+ a3
2066
+ I
2067
+ 29
2068
+ I
2069
+ b1
2070
+ x
2071
+ 49
2072
+ /home/kilian/code/ray/samples/shaders/geometry.rb
2073
+ p
2074
+ 0