diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..9701a56 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,10 @@ + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 32b9bab..9029cae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(graphs VERSION 0.0.2) +project(graphs VERSION 0.0.3) option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) option(ENABLE_UBSAN "Enable the ub sanitizer" OFF) diff --git a/lib/BLT-With-Graphics-Template b/lib/BLT-With-Graphics-Template index 20a8974..d40b917 160000 --- a/lib/BLT-With-Graphics-Template +++ b/lib/BLT-With-Graphics-Template @@ -1 +1 @@ -Subproject commit 20a8974f9b88bec1686c0a4bf0b6ace9850bdda3 +Subproject commit d40b917c32c6c135c3a2f939ee9436d85d94bd64 diff --git a/src/main.cpp b/src/main.cpp index 594b7a6..00a2fcf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,10 +35,28 @@ void init() renderer_2d.create(); } +float x = 50, y = 50; +float sx = 0.5, sy = 0.5; +float ax = 0.05, ay = 0.05; + void update(std::int32_t width, std::int32_t height) { global_matrices.update_perspectives(width, height, 90, 0.1, 2000); + x += sx; + y += sx; + + sx += ax; + sy += ay; + + if (x > 256) + sx *= -1; + if (y > 256) + sy *= -1; + + renderer_2d.drawLine(blt::vec4{1, 0, 1, 1}, blt::vec2{x,y}, blt::vec2{500, 500}, 5.0f); + renderer_2d.drawLine(blt::vec4{1, 0, 0, 1}, blt::vec2{0,150}, blt::vec2{240, 0}, 12.0f); + camera.update(); camera.update_view(global_matrices); global_matrices.update();