link programs before getting uniform locations; add Widget#draw_rect; fix GL.draw_rect; store uniforms as GLint

This commit is contained in:
josh committed 2014-08-04 23:19:30 -04:00
1 parent 7cc541ed29
commit be8f71296f
4 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -16,6 +16,7 @@ class GLProgram
raise NotImplementedError.new("Other arguments not yet implemented")
end
end
link
options.each do |option, value|
case option
when :uniforms
@@ -26,6 +27,5 @@ class GLProgram
raise "Unknown option #{option.inspect}"
end
end
link
end
end
+4
View File
@@ -30,4 +30,8 @@ module Widget
def render_end
end
def draw_rect(x, y, width, height, r, g, b, a)
GL.draw_rect(@x + x, @y + y, width, height, r, g, b, a)
end
end