ashton 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -203,7 +203,7 @@ module Ashton
203
203
  size = value.size
204
204
 
205
205
  raise ArgumentError, "Empty array not supported for uniform data" if size.zero?
206
- raise ArgumentError, "Only support uniforms up to 4 elements" if size > 4
206
+ # raise ArgumentError, "Only support uniforms up to 4 elements" if size > 4
207
207
 
208
208
  case value[0]
209
209
  when Float
@@ -220,6 +220,9 @@ module Ashton
220
220
  Gl.send "glUniform#{size}f", location, *value.map(&:to_f)
221
221
  end
222
222
 
223
+ when Gosu::Color
224
+ GL.send "glUniform4fv", location, value.map(&:to_opengl).flatten
225
+
223
226
  else
224
227
  raise ArgumentError, "Uniform data type not supported for element of type: #{value[0].class}"
225
228
  end
@@ -1,3 +1,3 @@
1
1
  module Ashton
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  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.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
313
  version: '0'
314
314
  segments:
315
315
  - 0
316
- hash: -2647752782962812358
316
+ hash: 1005943535457040703
317
317
  requirements: []
318
318
  rubyforge_project: ashton
319
319
  rubygems_version: 1.8.23.2