ashton 0.0.1alpha → 0.0.2alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. data/LICENSE +21 -21
  2. data/README.md +95 -68
  3. data/Rakefile +41 -23
  4. data/examples/bloom_example.rb +59 -0
  5. data/examples/lighting_example.rb +127 -0
  6. data/examples/media/SmallStar.png +0 -0
  7. data/examples/media/Starfighter.png +0 -0
  8. data/examples/media/simple.png +0 -0
  9. data/examples/noise_example.rb +94 -0
  10. data/examples/outline_example.rb +86 -0
  11. data/examples/particle_emitter_example.rb +114 -0
  12. data/examples/pixelate_example.rb +51 -49
  13. data/examples/pixelated_texture_example.rb +69 -0
  14. data/examples/radial_blur_example.rb +60 -62
  15. data/examples/shader_image_example.rb +74 -41
  16. data/examples/{shockwave2_example.rb → shockwave_example.rb} +74 -75
  17. data/examples/stencil_shader_example.rb +104 -0
  18. data/examples/{framebuffer_example.rb → texture_render_example.rb} +53 -49
  19. data/examples/{tv_screen_and_noise_example.rb → tv_screen_and_static_example.rb} +59 -59
  20. data/ext/ashton/GLee.c +18170 -0
  21. data/ext/ashton/GLee.h +17647 -0
  22. data/ext/ashton/ashton.c +42 -0
  23. data/ext/ashton/ashton.h +31 -0
  24. data/ext/ashton/color.c +45 -0
  25. data/ext/ashton/color.h +25 -0
  26. data/ext/ashton/common.h +41 -0
  27. data/ext/ashton/extconf.rb +42 -0
  28. data/ext/ashton/fast_math.c +30 -0
  29. data/ext/ashton/fast_math.h +30 -0
  30. data/ext/ashton/font.c +8 -0
  31. data/ext/ashton/font.h +16 -0
  32. data/ext/ashton/gosu.c +18 -0
  33. data/ext/ashton/gosu.h +19 -0
  34. data/ext/ashton/image.c +8 -0
  35. data/ext/ashton/image.h +16 -0
  36. data/ext/ashton/particle_emitter.c +788 -0
  37. data/ext/ashton/particle_emitter.h +171 -0
  38. data/ext/ashton/pixel_cache.c +237 -0
  39. data/ext/ashton/pixel_cache.h +58 -0
  40. data/ext/ashton/shader.c +9 -0
  41. data/ext/ashton/shader.h +16 -0
  42. data/ext/ashton/texture.c +442 -0
  43. data/ext/ashton/texture.h +63 -0
  44. data/ext/ashton/window.c +8 -0
  45. data/ext/ashton/window.h +16 -0
  46. data/lib/ashton.rb +38 -26
  47. data/lib/ashton/1.9/ashton.so +0 -0
  48. data/lib/ashton/gosu_ext/color.rb +24 -11
  49. data/lib/ashton/gosu_ext/font.rb +58 -0
  50. data/lib/ashton/gosu_ext/gosu_module.rb +16 -0
  51. data/lib/ashton/gosu_ext/image.rb +95 -31
  52. data/lib/ashton/gosu_ext/window.rb +78 -35
  53. data/lib/ashton/image_stub.rb +32 -36
  54. data/lib/ashton/lighting/light_source.rb +146 -0
  55. data/lib/ashton/lighting/manager.rb +98 -0
  56. data/lib/ashton/mixins/version_checking.rb +23 -0
  57. data/lib/ashton/particle_emitter.rb +87 -0
  58. data/lib/ashton/pixel_cache.rb +24 -0
  59. data/lib/ashton/shader.rb +353 -35
  60. data/lib/ashton/shaders/bloom.frag +41 -0
  61. data/lib/ashton/shaders/color_inversion.frag +11 -0
  62. data/lib/ashton/{post_process → shaders}/contrast.frag +16 -16
  63. data/lib/ashton/{shader → shaders}/default.frag +22 -19
  64. data/lib/ashton/{shader → shaders}/default.vert +13 -13
  65. data/lib/ashton/shaders/fade.frag +14 -0
  66. data/lib/ashton/shaders/grayscale.frag +15 -0
  67. data/lib/ashton/shaders/include/classicnoise2d.glsl +113 -0
  68. data/lib/ashton/shaders/include/classicnoise3d.glsl +177 -0
  69. data/lib/ashton/shaders/include/classicnoise4d.glsl +302 -0
  70. data/lib/ashton/{include/simplex.glsl → shaders/include/noise2d.glsl} +70 -63
  71. data/lib/ashton/shaders/include/noise3d.glsl +102 -0
  72. data/lib/ashton/shaders/include/noise4d.glsl +128 -0
  73. data/lib/ashton/shaders/include/rand.glsl +5 -0
  74. data/lib/ashton/shaders/lighting/distort.frag +57 -0
  75. data/lib/ashton/shaders/lighting/draw_shadows.frag +60 -0
  76. data/lib/ashton/shaders/lighting/shadow_blur.frag +60 -0
  77. data/lib/ashton/shaders/mezzotint.frag +22 -0
  78. data/lib/ashton/shaders/multitexture2.vert +19 -0
  79. data/lib/ashton/shaders/outline.frag +45 -0
  80. data/lib/ashton/{post_process → shaders}/pixelate.frag +48 -48
  81. data/lib/ashton/shaders/radial_blur.frag +63 -0
  82. data/lib/ashton/shaders/sepia.frag +26 -0
  83. data/lib/ashton/{post_process/shockwave2.frag → shaders/shockwave.frag} +38 -35
  84. data/lib/ashton/shaders/signed_distance_field.frag +80 -0
  85. data/lib/ashton/{post_process/noise.frag → shaders/static.frag} +25 -27
  86. data/lib/ashton/shaders/stencil.frag +27 -0
  87. data/lib/ashton/shaders/tv_screen.frag +23 -0
  88. data/lib/ashton/signed_distance_field.rb +151 -0
  89. data/lib/ashton/texture.rb +186 -0
  90. data/lib/ashton/version.rb +2 -2
  91. data/lib/ashton/window_buffer.rb +16 -0
  92. data/spec/ashton/ashton_spec.rb +22 -0
  93. data/spec/ashton/gosu_ext/color_spec.rb +34 -0
  94. data/spec/ashton/gosu_ext/font_spec.rb +57 -0
  95. data/spec/ashton/gosu_ext/gosu_spec.rb +11 -0
  96. data/spec/ashton/gosu_ext/image_spec.rb +66 -0
  97. data/spec/ashton/gosu_ext/window_spec.rb +71 -0
  98. data/spec/ashton/image_stub_spec.rb +46 -0
  99. data/spec/ashton/particle_emitter_spec.rb +123 -0
  100. data/spec/ashton/pixel_cache_spec.rb +153 -0
  101. data/spec/ashton/shader_spec.rb +152 -0
  102. data/spec/ashton/signed_distance_field_spec.rb +163 -0
  103. data/spec/ashton/texture_spec.rb +347 -0
  104. data/spec/helper.rb +12 -0
  105. metadata +159 -28
  106. data/examples/output/README.txt +0 -1
  107. data/lib/ashton/base_shader.rb +0 -172
  108. data/lib/ashton/framebuffer.rb +0 -183
  109. data/lib/ashton/post_process.rb +0 -83
  110. data/lib/ashton/post_process/default.vert +0 -9
  111. data/lib/ashton/post_process/fade.frag +0 -11
  112. data/lib/ashton/post_process/mezzotint.frag +0 -24
  113. data/lib/ashton/post_process/radial_blur.frag +0 -31
  114. data/lib/ashton/post_process/sepia.frag +0 -19
  115. data/lib/ashton/post_process/shockwave.frag +0 -40
  116. data/lib/ashton/post_process/tv_screen.frag +0 -32
@@ -0,0 +1,347 @@
1
+ require_relative "../helper.rb"
2
+
3
+ describe Ashton::Texture do
4
+ before :each do
5
+ $window = Gosu::Window.new 16, 16, false # Horrible, but otherwise we can't flush out "wrong" params properly.
6
+ end
7
+
8
+ let(:testcard_image) { Gosu::Image.new $window, media_path("simple.png") }
9
+ let(:subject) { described_class.new testcard_image }
10
+
11
+ describe "initialize" do
12
+ it "should fail with too few arguments" do
13
+ ->{ described_class.new }.should raise_error ArgumentError, /Expected 1, 2 or 3 parameters./
14
+ end
15
+
16
+ it "should fail with too many arguments" do
17
+ ->{ described_class.new 1, 2, 3, 4 }.should raise_error ArgumentError, /Expected 1, 2 or 3 parameters./
18
+ end
19
+
20
+ it "should fail if the texture size is too large" do
21
+ ->{ described_class.new 100000, 100000 }.should raise_error ArgumentError, /Unable to create a texture of size 100000x100000/
22
+ end
23
+
24
+ describe "creating blank image (1 parameter)" do
25
+ let(:subject) { described_class.new 10, 12 }
26
+
27
+ it "should be of the expected size" do
28
+ subject.width.should eq 10
29
+ subject.height.should eq 12
30
+ end
31
+
32
+ it "should be totally blank" do
33
+ color = Gosu::Color.rgba 0, 0, 0, 0
34
+ 10.times do |x|
35
+ 12.times do |y|
36
+ subject[x, y].should eq color
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+ describe "creating from Gosu::Image (2 parameters)" do
43
+ let(:image) { testcard_image }
44
+ let(:subject) { described_class.new image }
45
+
46
+ it "should be of the expected size" do
47
+ subject.width.should eq image.width
48
+ subject.height.should eq image.height
49
+ end
50
+
51
+ it "should be an identical copy of the image" do
52
+ subject.to_blob.should eq image.to_blob
53
+ end
54
+ end
55
+
56
+ describe "creating from blob (3 parameters)" do
57
+ let(:image) { testcard_image }
58
+ let(:subject) { described_class.new image.to_blob, image.width, image.height }
59
+
60
+ it "should fail if the width/height are not the expected size" do
61
+ ->{ described_class.new image.to_blob, image.width, image.height + 1 }.should raise_error ArgumentError, /Blob data is not of expected size/
62
+ end
63
+
64
+ it "should be of the expected size" do
65
+ subject.width.should eq image.width
66
+ subject.height.should eq image.height
67
+ end
68
+
69
+ it "should be filled with the blob data" do
70
+ subject.to_blob.should eq image.to_blob
71
+ end
72
+ end
73
+ end
74
+
75
+ describe "id" do
76
+ it "should be a positive number" do
77
+ subject.id.should be_kind_of Integer
78
+ subject.id.should > 0
79
+ end
80
+ end
81
+
82
+ describe "fbo_id" do
83
+ it "should be a positive number" do
84
+ subject.fbo_id.should be_kind_of Integer
85
+ subject.fbo_id.should > 0
86
+ end
87
+ end
88
+
89
+ describe "cache" do
90
+ it "should be a PixelCache" do
91
+ subject.cache.should be_kind_of Ashton::PixelCache
92
+ end
93
+
94
+ it "should be of the right size" do
95
+ subject.cache.width.should eq testcard_image.width
96
+ subject.cache.height.should eq testcard_image.height
97
+ end
98
+
99
+ it "should consider the Texture its owner" do
100
+ subject.cache.owner.should eq subject
101
+ end
102
+ end
103
+
104
+ describe "refresh_cache" do
105
+ it "should be defined" do
106
+ subject.should respond_to :refresh_cache
107
+ end
108
+ end
109
+
110
+ describe "[]" do
111
+ it "should return the color of the pixel" do
112
+ subject[0, 0].should eq Gosu::Color::WHITE
113
+ subject[0, 1].should eq Gosu::Color::RED
114
+ subject[0, 2].should eq Gosu::Color::GREEN
115
+ subject[0, 3].should eq Gosu::Color::BLUE
116
+ subject[0, 4].should eq Gosu::Color.rgba(255, 255, 255, 153)
117
+ subject[0, 8].should eq Gosu::Color.rgba(0, 0, 0, 0)
118
+ end
119
+
120
+ it "should return a null colour outside the texture" do
121
+ subject[0, -1].should eq Gosu::Color.new 0
122
+ subject[-1, 0].should eq Gosu::Color.new 0
123
+ subject[16, 0].should eq Gosu::Color.new 0
124
+ subject[0, 12].should eq Gosu::Color.new 0
125
+ end
126
+ end
127
+
128
+ describe "rgba" do
129
+ it "should return the appropriate array of values" do
130
+ subject.rgba(0, 0).should eq [255, 255, 255, 255]
131
+ subject.rgba(0, 1).should eq [255, 0, 0, 255]
132
+ subject.rgba(0, 2).should eq [0, 255, 0, 255]
133
+ subject.rgba(0, 3).should eq [0, 0, 255, 255]
134
+ subject.rgba(0, 4).should eq [255, 255, 255, 153]
135
+ subject.rgba(0, 8).should eq [0, 0, 0, 0]
136
+ end
137
+ end
138
+
139
+ describe "red" do
140
+ it "should return the appropriate value" do
141
+ subject.red(0, 0).should eq 255
142
+ subject.red(0, 1).should eq 255
143
+ subject.red(0, 2).should eq 0
144
+ subject.red(0, 3).should eq 0
145
+ subject.red(0, 8).should eq 0
146
+ end
147
+ end
148
+
149
+ describe "green" do
150
+ it "should return the appropriate value" do
151
+ subject.green(0, 0).should eq 255
152
+ subject.green(0, 1).should eq 0
153
+ subject.green(0, 2).should eq 255
154
+ subject.green(0, 3).should eq 0
155
+ subject.green(0, 8).should eq 0
156
+ end
157
+ end
158
+
159
+ describe "blue" do
160
+ it "should return the appropriate value" do
161
+ subject.blue(0, 0).should eq 255
162
+ subject.blue(0, 1).should eq 0
163
+ subject.blue(0, 2).should eq 0
164
+ subject.blue(0, 3).should eq 255
165
+ subject.blue(0, 8).should eq 0
166
+ end
167
+ end
168
+
169
+ describe "alpha" do
170
+ it "should return the appropriate value" do
171
+ subject.alpha(0, 0).should eq 255
172
+ subject.alpha(0, 1).should eq 255
173
+ subject.alpha(0, 2).should eq 255
174
+ subject.alpha(0, 3).should eq 255
175
+ subject.alpha(0, 8).should eq 0
176
+ end
177
+ end
178
+
179
+ describe "transparent?" do
180
+ it "should be false where the buffer is opaque or semi-transparent" do
181
+ subject.transparent?(0, 1).should be_false
182
+ subject.transparent?(0, 5).should be_false
183
+ end
184
+
185
+ it "should be true where the buffer is transparent" do
186
+ subject.transparent?(0, 8).should be_true
187
+ end
188
+ end
189
+
190
+ describe "width" do
191
+ it "should be initially set" do
192
+ subject.width.should eq testcard_image.width
193
+ end
194
+ end
195
+
196
+ describe "height" do
197
+ it "should be initially set" do
198
+ subject.height.should eq testcard_image.height
199
+ end
200
+ end
201
+
202
+ describe "render" do
203
+ it "should fail without a block" do
204
+ ->{ subject.render }.should raise_error ArgumentError, /block required/i
205
+ end
206
+
207
+ it "should fail if nested" do
208
+ ->{
209
+ subject.render do
210
+ subject.render {}
211
+ end
212
+ }.should raise_error Ashton::Error, /nest rendering/i
213
+ end
214
+
215
+ it "should pass itself into the block" do
216
+ buffer = nil
217
+ subject.render do |fb|
218
+ buffer = fb
219
+ end
220
+
221
+ buffer.should eq subject
222
+ end
223
+
224
+ it "should be rendering in the block, but not rendering before and after it" do
225
+ subject.should_not be_rendering
226
+ subject.render do
227
+ subject.should be_rendering
228
+ end
229
+ subject.should_not be_rendering
230
+ end
231
+ end
232
+
233
+ describe "clear" do
234
+ it "should clear the buffer to transparent" do
235
+ subject.clear
236
+ subject.width.times do |x|
237
+ subject.height.times do |y|
238
+ subject[x, y].should eq Gosu::Color.rgba(0, 0, 0, 0)
239
+ end
240
+ end
241
+ end
242
+
243
+ it "should clear the buffer to a specified Gosu::Color" do
244
+ subject.clear color: Gosu::Color::CYAN
245
+ subject.width.times do |x|
246
+ subject.height.times do |y|
247
+ subject[x, y].should eq Gosu::Color::CYAN
248
+ end
249
+ end
250
+ end
251
+
252
+ it "should clear the buffer to a specified opengl color float array" do
253
+ subject.clear color: Gosu::Color::CYAN.to_opengl
254
+ subject.width.times do |x|
255
+ subject.height.times do |y|
256
+ subject[x, y].should eq Gosu::Color::CYAN
257
+ end
258
+ end
259
+ end
260
+ end
261
+
262
+ describe "draw" do
263
+ it "should be able to be drawn" do
264
+ subject.draw 1, 2, 3
265
+ end
266
+
267
+ it "should be drawn with a specific blend mode" do
268
+ [:alpha_blend, :add, :multiply, :replace].each do |mode|
269
+ subject.draw 1, 2, 3, mode: mode
270
+ end
271
+ end
272
+
273
+ it "should fail with a bad blend mode name" do
274
+ ->{ subject.draw 1, 2, 3, mode: :fish }.should raise_error(ArgumentError, /Unsupported draw :mode, :fish/)
275
+ end
276
+
277
+ it "should fail with a bad blend mode type" do
278
+ ->{ subject.draw 1, 2, 3, mode: 12 }.should raise_error TypeError
279
+ end
280
+
281
+ it "should be drawn with a specific color" do
282
+ subject.draw 1, 2, 3, color: Gosu::Color::RED
283
+ end
284
+
285
+ it "should fail with a bad color type" do
286
+ ->{ subject.draw 1, 2, 3, color: 12 }.should raise_error TypeError
287
+ end
288
+
289
+ it "should be drawn with a specific shader" do
290
+ subject.draw 1, 2, 3, shader: Ashton::Shader.new
291
+ end
292
+
293
+ it "should fail with a bad shader type" do
294
+ ->{ subject.draw 1, 2, 3, shader: 12 }.should raise_error TypeError
295
+ end
296
+
297
+ it "should draw with a Texture passed to multitexture" do
298
+ subject.draw 1, 2, 3, multitexture: Ashton::Texture.new(10, 10)
299
+ end
300
+
301
+ it "should fail with a bad multitexture option" do
302
+ ->{ subject.draw 1, 2, 3, multitexture: :fish }.should raise_error(TypeError, /Expected :multitexture option of type Ashton::Texture/)
303
+ end
304
+
305
+ it "should draw with pixelated on" do
306
+ subject.draw 1, 2, 3, pixelated: true
307
+ end
308
+
309
+ it "should draw with pixelated off" do
310
+ subject.draw 1, 2, 3, pixelated: false
311
+ end
312
+ end
313
+
314
+ describe "to_blob" do
315
+ it "should create a blob the same as an equivalent image would" do
316
+ subject.to_blob.should eq testcard_image.to_blob
317
+ end
318
+ end
319
+
320
+ describe "to_image" do
321
+ let(:image) { subject.to_image }
322
+
323
+ it "should create a Gosu::Image" do
324
+ image.should be_kind_of Gosu::Image
325
+ end
326
+
327
+ it "should create an image of the appropriate size" do
328
+ image.width.should eq testcard_image.width
329
+ image.height.should eq testcard_image.height
330
+ end
331
+
332
+ it "should create an image identical to the one that was drawn into it originally" do
333
+ image.to_blob.should eq testcard_image.to_blob
334
+ end
335
+ end
336
+
337
+ describe "dup" do
338
+ it "should create a new Texture object" do
339
+ new = subject.dup.should be_kind_of described_class
340
+ new.should_not be subject
341
+ end
342
+
343
+ it "should create an exact copy of the Texture" do
344
+ subject.dup.to_blob.should eq subject.to_blob
345
+ end
346
+ end
347
+ end
data/spec/helper.rb ADDED
@@ -0,0 +1,12 @@
1
+ require_relative "../lib/ashton"
2
+
3
+ require "rspec"
4
+ require 'rspec/autorun'
5
+ require "rr"
6
+ require 'texplay'
7
+
8
+ RSpec.configure do |config|
9
+ config.mock_framework = :rr
10
+ end
11
+
12
+ def media_path(file); File.expand_path "../examples/media/#{file}", File.dirname(__FILE__) end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ashton
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1alpha
4
+ version: 0.0.2alpha
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-10 00:00:00.000000000 Z
12
+ date: 2013-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: opengl
@@ -27,6 +27,38 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.8.0.pre1
30
+ - !ruby/object:Gem::Dependency
31
+ name: gosu
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.7.45
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.7.45
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake-compiler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 0.8.1
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.8.1
30
62
  - !ruby/object:Gem::Dependency
31
63
  name: rspec
32
64
  requirement: !ruby/object:Gem::Requirement
@@ -43,6 +75,22 @@ dependencies:
43
75
  - - ~>
44
76
  - !ruby/object:Gem::Version
45
77
  version: 2.10.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: rr
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 1.0.4
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.0.4
46
94
  - !ruby/object:Gem::Dependency
47
95
  name: launchy
48
96
  requirement: !ruby/object:Gem::Requirement
@@ -114,7 +162,7 @@ dependencies:
114
162
  requirements:
115
163
  - - ~>
116
164
  - !ruby/object:Gem::Version
117
- version: '0.3'
165
+ version: 0.4.3
118
166
  type: :development
119
167
  prerelease: false
120
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,7 +170,7 @@ dependencies:
122
170
  requirements:
123
171
  - - ~>
124
172
  - !ruby/object:Gem::Version
125
- version: '0.3'
173
+ version: 0.4.3
126
174
  description: ! 'Extra special effects, such as shader, for the Gosu game-development
127
175
  library
128
176
 
@@ -130,49 +178,119 @@ description: ! 'Extra special effects, such as shader, for the Gosu game-develop
130
178
  email:
131
179
  - bil.bagpuss@gmail.com
132
180
  executables: []
133
- extensions: []
181
+ extensions:
182
+ - ext/ashton/extconf.rb
134
183
  extra_rdoc_files: []
135
184
  files:
136
185
  - CHANGELOG
137
186
  - LICENSE
138
187
  - Rakefile
139
188
  - README.md
140
- - lib/ashton/base_shader.rb
141
- - lib/ashton/framebuffer.rb
189
+ - lib/ashton/1.9/ashton.so
142
190
  - lib/ashton/gosu_ext/color.rb
191
+ - lib/ashton/gosu_ext/font.rb
192
+ - lib/ashton/gosu_ext/gosu_module.rb
143
193
  - lib/ashton/gosu_ext/image.rb
144
194
  - lib/ashton/gosu_ext/window.rb
145
195
  - lib/ashton/image_stub.rb
146
- - lib/ashton/include/simplex.glsl
147
- - lib/ashton/post_process/contrast.frag
148
- - lib/ashton/post_process/default.vert
149
- - lib/ashton/post_process/fade.frag
150
- - lib/ashton/post_process/mezzotint.frag
151
- - lib/ashton/post_process/noise.frag
152
- - lib/ashton/post_process/pixelate.frag
153
- - lib/ashton/post_process/radial_blur.frag
154
- - lib/ashton/post_process/sepia.frag
155
- - lib/ashton/post_process/shockwave.frag
156
- - lib/ashton/post_process/shockwave2.frag
157
- - lib/ashton/post_process/tv_screen.frag
158
- - lib/ashton/post_process.rb
159
- - lib/ashton/shader/default.frag
160
- - lib/ashton/shader/default.vert
196
+ - lib/ashton/lighting/light_source.rb
197
+ - lib/ashton/lighting/manager.rb
198
+ - lib/ashton/mixins/version_checking.rb
199
+ - lib/ashton/particle_emitter.rb
200
+ - lib/ashton/pixel_cache.rb
161
201
  - lib/ashton/shader.rb
202
+ - lib/ashton/shaders/bloom.frag
203
+ - lib/ashton/shaders/color_inversion.frag
204
+ - lib/ashton/shaders/contrast.frag
205
+ - lib/ashton/shaders/default.frag
206
+ - lib/ashton/shaders/default.vert
207
+ - lib/ashton/shaders/fade.frag
208
+ - lib/ashton/shaders/grayscale.frag
209
+ - lib/ashton/shaders/include/classicnoise2d.glsl
210
+ - lib/ashton/shaders/include/classicnoise3d.glsl
211
+ - lib/ashton/shaders/include/classicnoise4d.glsl
212
+ - lib/ashton/shaders/include/noise2d.glsl
213
+ - lib/ashton/shaders/include/noise3d.glsl
214
+ - lib/ashton/shaders/include/noise4d.glsl
215
+ - lib/ashton/shaders/include/rand.glsl
216
+ - lib/ashton/shaders/lighting/distort.frag
217
+ - lib/ashton/shaders/lighting/draw_shadows.frag
218
+ - lib/ashton/shaders/lighting/shadow_blur.frag
219
+ - lib/ashton/shaders/mezzotint.frag
220
+ - lib/ashton/shaders/multitexture2.vert
221
+ - lib/ashton/shaders/outline.frag
222
+ - lib/ashton/shaders/pixelate.frag
223
+ - lib/ashton/shaders/radial_blur.frag
224
+ - lib/ashton/shaders/sepia.frag
225
+ - lib/ashton/shaders/shockwave.frag
226
+ - lib/ashton/shaders/signed_distance_field.frag
227
+ - lib/ashton/shaders/static.frag
228
+ - lib/ashton/shaders/stencil.frag
229
+ - lib/ashton/shaders/tv_screen.frag
230
+ - lib/ashton/signed_distance_field.rb
231
+ - lib/ashton/texture.rb
162
232
  - lib/ashton/version.rb
233
+ - lib/ashton/window_buffer.rb
163
234
  - lib/ashton.rb
164
- - examples/framebuffer_example.rb
235
+ - examples/bloom_example.rb
236
+ - examples/lighting_example.rb
165
237
  - examples/media/Earth.png
166
238
  - examples/media/LargeStar.png
167
239
  - examples/media/simple.png
240
+ - examples/media/SmallStar.png
168
241
  - examples/media/Star.png
169
242
  - examples/media/Starfighter.bmp
170
- - examples/output/README.txt
243
+ - examples/media/Starfighter.png
244
+ - examples/noise_example.rb
245
+ - examples/outline_example.rb
246
+ - examples/particle_emitter_example.rb
247
+ - examples/pixelated_texture_example.rb
171
248
  - examples/pixelate_example.rb
172
249
  - examples/radial_blur_example.rb
173
250
  - examples/shader_image_example.rb
174
- - examples/shockwave2_example.rb
175
- - examples/tv_screen_and_noise_example.rb
251
+ - examples/shockwave_example.rb
252
+ - examples/stencil_shader_example.rb
253
+ - examples/texture_render_example.rb
254
+ - examples/tv_screen_and_static_example.rb
255
+ - spec/ashton/ashton_spec.rb
256
+ - spec/ashton/gosu_ext/color_spec.rb
257
+ - spec/ashton/gosu_ext/font_spec.rb
258
+ - spec/ashton/gosu_ext/gosu_spec.rb
259
+ - spec/ashton/gosu_ext/image_spec.rb
260
+ - spec/ashton/gosu_ext/window_spec.rb
261
+ - spec/ashton/image_stub_spec.rb
262
+ - spec/ashton/particle_emitter_spec.rb
263
+ - spec/ashton/pixel_cache_spec.rb
264
+ - spec/ashton/shader_spec.rb
265
+ - spec/ashton/signed_distance_field_spec.rb
266
+ - spec/ashton/texture_spec.rb
267
+ - spec/helper.rb
268
+ - ext/ashton/ashton.c
269
+ - ext/ashton/color.c
270
+ - ext/ashton/fast_math.c
271
+ - ext/ashton/font.c
272
+ - ext/ashton/GLee.c
273
+ - ext/ashton/gosu.c
274
+ - ext/ashton/image.c
275
+ - ext/ashton/particle_emitter.c
276
+ - ext/ashton/pixel_cache.c
277
+ - ext/ashton/shader.c
278
+ - ext/ashton/texture.c
279
+ - ext/ashton/window.c
280
+ - ext/ashton/ashton.h
281
+ - ext/ashton/color.h
282
+ - ext/ashton/common.h
283
+ - ext/ashton/fast_math.h
284
+ - ext/ashton/font.h
285
+ - ext/ashton/GLee.h
286
+ - ext/ashton/gosu.h
287
+ - ext/ashton/image.h
288
+ - ext/ashton/particle_emitter.h
289
+ - ext/ashton/pixel_cache.h
290
+ - ext/ashton/shader.h
291
+ - ext/ashton/texture.h
292
+ - ext/ashton/window.h
293
+ - ext/ashton/extconf.rb
176
294
  homepage: https://github.com/spooner/ashton
177
295
  licenses:
178
296
  - MIT
@@ -185,7 +303,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
303
  requirements:
186
304
  - - ! '>='
187
305
  - !ruby/object:Gem::Version
188
- version: '0'
306
+ version: 1.9.2
189
307
  required_rubygems_version: !ruby/object:Gem::Requirement
190
308
  none: false
191
309
  requirements:
@@ -198,4 +316,17 @@ rubygems_version: 1.8.24
198
316
  signing_key:
199
317
  specification_version: 3
200
318
  summary: Extra special effects, such as shader, for the Gosu game-development library
201
- test_files: []
319
+ test_files:
320
+ - spec/ashton/ashton_spec.rb
321
+ - spec/ashton/gosu_ext/color_spec.rb
322
+ - spec/ashton/gosu_ext/font_spec.rb
323
+ - spec/ashton/gosu_ext/gosu_spec.rb
324
+ - spec/ashton/gosu_ext/image_spec.rb
325
+ - spec/ashton/gosu_ext/window_spec.rb
326
+ - spec/ashton/image_stub_spec.rb
327
+ - spec/ashton/particle_emitter_spec.rb
328
+ - spec/ashton/pixel_cache_spec.rb
329
+ - spec/ashton/shader_spec.rb
330
+ - spec/ashton/signed_distance_field_spec.rb
331
+ - spec/ashton/texture_spec.rb
332
+ - spec/helper.rb