jes-ruby/runtime/lib/gl_program.rb

17 lines
415 B
Ruby

class GLProgram
# @overload initialize(*shaders, options = {})
#
# @param shaders [Array<GLShader>] Shaders to attach to the program.
# @param options [Hash] Optional parameters.
def initialize(*args)
args.each do |arg|
if arg.is_a?(GLShader)
attach_shader(arg)
else
raise NotImplementedError.new("Other arguments not yet implemented")
end
end
link
end
end