link programs before getting uniform locations; add Widget#draw_rect; fix GL.draw_rect; store uniforms as GLint
This commit is contained in:
1 parent
7cc541ed29
commit
be8f71296f
4 files changed
+7
-3
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user