diff options
author | Frederico Linhares <fred@linhares.blue> | 2022-08-30 17:45:40 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2022-08-30 17:45:40 -0300 |
commit | f1f1576543bb4e0f3b9bc4cd0ba4a12a70546c3c (patch) | |
tree | 87160fb7462ee5b4385ba6e9b0ccb51657b2f796 /test/src | |
parent | 42e03ddc3b28c41b81fb5410feb72750530ffa13 (diff) |
feat Create 2d graphics pipeline
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/main.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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); |