diff --git a/.idea/compilerexplorer.settings.xml b/.idea/compilerexplorer.settings.xml new file mode 100644 index 0000000..7c9e8f9 --- /dev/null +++ b/.idea/compilerexplorer.settings.xml @@ -0,0 +1,443 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index d216e76..789d06a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(graphs VERSION 0.0.10) +project(graphs VERSION 0.0.11) 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 e9e3622..f2a8123 160000 --- a/lib/BLT-With-Graphics-Template +++ b/lib/BLT-With-Graphics-Template @@ -1 +1 @@ -Subproject commit e9e36229633164c1133915c4fe73469fae6b65ab +Subproject commit f2a81237a852891618330f7d89dcd02e90223b87 diff --git a/res/debian.png b/res/debian.png new file mode 100644 index 0000000..c63e65d Binary files /dev/null and b/res/debian.png differ diff --git a/res/john256.png b/res/john256.png new file mode 100644 index 0000000..760e96b Binary files /dev/null and b/res/john256.png differ diff --git a/src/main.cpp b/src/main.cpp index 2ba27f5..3dafb48 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,6 +32,9 @@ void init(const blt::gfx::window_context& context) { using namespace blt::gfx; + resources.enqueue("../res/debian.png", "debian"); + resources.enqueue("../res/john256.png", "john"); + global_matrices.create_internals(); resources.load_resources(); renderer_2d.create(); @@ -45,8 +48,8 @@ float ax = 0.05, ay = 0.05; void update(const blt::gfx::window_context& context, std::int32_t width, std::int32_t height) { - render_texture.bind(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + //render_texture.bind(); + //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); global_matrices.update_perspectives(width, height, 90, 0.1, 2000); x += sx; @@ -63,7 +66,7 @@ void update(const blt::gfx::window_context& context, std::int32_t width, std::in renderer_2d.drawLine(blt::vec4{1, 0, 1, 1}, 0.0f, blt::vec2{x,y}, blt::vec2{500, 500}, 5.0f); renderer_2d.drawLine(blt::vec4{1, 0, 0, 1}, 0.0f, blt::vec2{0,150}, blt::vec2{240, 0}, 12.0f); renderer_2d.drawPoint(blt::vec4{0, 1, 0, 1}, 1.0f, blt::vec2{500, 500}, 50.0f); - renderer_2d.drawPoint(blt::vec4{0, 1, 1, 1}, 1.0f, blt::vec2{800, 500}, 256.0f); + renderer_2d.drawPoint("john", 1.0f, blt::vec2{800, 500}, 256.0f); //renderer_2d.drawRectangle(blt::vec4{1,1,1,1}, -1.0f, blt::vec2{width / 2.0, height / 2.0}, blt::vec2{width, height}); camera.update(); @@ -71,7 +74,7 @@ void update(const blt::gfx::window_context& context, std::int32_t width, std::in global_matrices.update(); renderer_2d.render(); - blt::gfx::fbo_t::unbind(); + //blt::gfx::fbo_t::unbind(); } int main(int argc, const char** argv)