From f1f1576543bb4e0f3b9bc4cd0ba4a12a70546c3c Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Tue, 30 Aug 2022 17:45:40 -0300 Subject: feat Create 2d graphics pipeline --- test/src/main.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/src') diff --git a/test/src/main.rb b/test/src/main.rb index 2c8bdcc..6ac0dde 100644 --- a/test/src/main.rb +++ b/test/src/main.rb @@ -18,6 +18,7 @@ TRANSLATION_SPEED = 0.5; def init() $texture = CandyGear::Texture.from_image("textures/color_texture.png"); + $sprite = CandyGear::Sprite.new($texture, 0, 0, 1.0, 1.0); $model = CandyGear::Model.new("models/cube.cgmodel", $texture); $instances = [ @@ -67,6 +68,7 @@ end def quit() = CandyGear.quit(); def tick() + $sprite.draw(-1.0, -1.0, -0.70, -0.5); $instances_rotation.rotate(0.0, BOX_ROTATION_SPEED); $instances.each do |i| $model.draw(i, $instances_rotation); -- cgit v1.2.3