summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/main.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/src/main.rb b/test/src/main.rb
index f5c0676..67ef80c 100644
--- a/test/src/main.rb
+++ b/test/src/main.rb
@@ -35,8 +35,14 @@ def init()
$camera_position = CandyGear::Vector3D.new(0.0, 0.0, 0.0);
$camera_rotation = CandyGear::Rotation3D.new(0.0, 0.0, 0.0);
- CandyGear.camera_position = $camera_position;
- CandyGear.camera_rotation = $camera_rotation;
+
+ color = CandyGear::Vector3D.new(0.12, 0.12, 0.18);
+ $view1 = CandyGear::View.new(CandyGear::Vector4D.new(0, 0, 1280, 360));
+ $view2 = CandyGear::View.new(CandyGear::Vector4D.new(0, 360, 1280, 360));
+ CandyGear.views = [$view1, $view2];
+
+ $view1.camera_position = $camera_position;
+ $view1.camera_rotation = $camera_rotation;
end
def key_down(key)
@@ -70,7 +76,7 @@ end
def quit() = CandyGear.quit();
def tick()
- $sprite.draw($sprite_position);
+ $sprite.draw($view2, $sprite_position);
$instances_rotation.rotate(0.0, BOX_ROTATION_SPEED);
$instances.each do |i|
$model.draw(i, $instances_rotation);