ashton 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ashton/shader.rb +4 -1
- data/lib/ashton/version.rb +1 -1
- metadata +2 -2
data/lib/ashton/shader.rb
CHANGED
@@ -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
|
data/lib/ashton/version.rb
CHANGED
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.
|
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:
|
316
|
+
hash: 1005943535457040703
|
317
317
|
requirements: []
|
318
318
|
rubyforge_project: ashton
|
319
319
|
rubygems_version: 1.8.23.2
|