I am trying to make some simple shapes in gosu (ruby). I am finding it difficult where to call the functions. Is it update method or the draw method?
also how do you specify the color to these shapes?
I quickly came up with this code (mind you, i am newbie and learning ruby and gosu)
require 'rubygems'
require 'gosu'
class DemoWindow < Gosu::Window
def initialize
super(640, 400, false)
end
def draw
draw_quad(x-size, y-size, 0xffffffff, x+size, y-size, 0xffffffff, x-size, y+size, 0xffffffff, x+size, y+size, 0xffffffff, 0)
draw_triangle(x1, y1, c1, x2, y2, c2, x3, y3, c3, z=0, mode=:default)
draw_line(x1, y1, c1, x2, y2, c2, z=0, mode=:default)
end
end
DemoWindow.new.show
any thoughts? :)