diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/src/main.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/src/main.rb b/test/src/main.rb index be0ae0b..b7bbe85 100644 --- a/test/src/main.rb +++ b/test/src/main.rb @@ -25,9 +25,12 @@ end def init() texture = CandyGear::Texture.from_image("textures/color_texture.png"); mesh = CandyGear::Mesh.new("meshes/cube.cgmesh"); + + $color = CandyGear::Vector3D.new(0.8, 0.2, 0.2); $model = CandyGear::Model.new(mesh, texture); $sprite = CandyGear::Sprite.new( texture, CandyGear::Vector4D.new(0, 0, 1.0, 1.0)); + $rectangle = CandyGear::Rectangle.new(102.0, 1.0, 101.0, 101.0) $sprite_position = CandyGear::Vector4D.new(1.0, 1.0, 101.0, 101.0); $instances = [ @@ -83,8 +86,9 @@ end def quit() = CandyGear.quit(); def tick() - $view1.draw($sprite, $sprite_position); + $sprite.draw($view1, $sprite_position); $instances_rotation.rotate(0.0, BOX_ROTATION_SPEED); + $rectangle.draw($view1, $color); $instances.each do |i| $model.draw(i, $instances_rotation); end |