From 85beae363052df78302cef0f9b5d2061a6c93f9f Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Mon, 11 Nov 2024 19:22:44 -0500 Subject: [PATCH] whyy --- CMakeLists.txt | 2 +- lib/blt-with-graphics | 2 +- renderdoc_settings.cap | 27 +++++++++++++++++++++++++++ src/main.cpp | 13 +++++++++++-- 4 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 renderdoc_settings.cap diff --git a/CMakeLists.txt b/CMakeLists.txt index f61e2cf..48c9a37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(COSC-4P80-Assignment-3 VERSION 0.0.11) +project(COSC-4P80-Assignment-3 VERSION 0.0.12) include(FetchContent) option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) diff --git a/lib/blt-with-graphics b/lib/blt-with-graphics index de45494..635589b 160000 --- a/lib/blt-with-graphics +++ b/lib/blt-with-graphics @@ -1 +1 @@ -Subproject commit de454940bcf53d2de091bc4b8e3e86c1a03cf85b +Subproject commit 635589b04d42b4d556a2a2a6a3f839f38b63d789 diff --git a/renderdoc_settings.cap b/renderdoc_settings.cap new file mode 100644 index 0000000..d0b099b --- /dev/null +++ b/renderdoc_settings.cap @@ -0,0 +1,27 @@ +{ + "rdocCaptureSettings": 1, + "settings": { + "autoStart": false, + "commandLine": "", + "environment": [ + ], + "executable": "/home/brett/Documents/Brock/CS 4P80/COSC-4P80-Assignment-3/cmake-build-relwithdebinfo/COSC-4P80-Assignment-3", + "inject": false, + "numQueuedFrames": 0, + "options": { + "allowFullscreen": true, + "allowVSync": true, + "apiValidation": false, + "captureAllCmdLists": false, + "captureCallstacks": false, + "captureCallstacksOnlyDraws": false, + "debugOutputMute": true, + "delayForDebugger": 0, + "hookIntoChildren": false, + "refAllResources": false, + "verifyBufferAccess": false + }, + "queuedFrameCap": 0, + "workingDir": "" + } +} diff --git a/src/main.cpp b/src/main.cpp index 168ad95..39f1ad7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,13 +4,13 @@ #include #include "blt/gfx/renderer/resource_manager.h" #include "blt/gfx/renderer/batch_2d_renderer.h" +#include "blt/gfx/renderer/font_renderer.h" #include "blt/gfx/renderer/camera.h" #include "blt/std/binary_tree.h" #include "blt/std/random.h" #include #include #include -#include using namespace assign3; @@ -21,6 +21,7 @@ blt::gfx::matrix_state_manager global_matrices; blt::gfx::resource_manager resources; blt::gfx::batch_renderer_2d renderer_2d(resources, global_matrices); blt::gfx::first_person_camera_2d camera; +blt::gfx::font_renderer_t font_renderer{}; blt::size_t som_width = 5; blt::size_t som_height = 5; @@ -90,6 +91,13 @@ void init(const blt::gfx::window_data&) resources.load_resources(); renderer_2d.create(); + font_renderer.create({9, 11, 12, 13, 14, 16, 18, 24, 32, 36, 40, 48, 52, 64, 72, 96, 106}, 2048); + + font::font_face_t default_font_face{reinterpret_cast(font::default_font_compressed_data), font::default_font_compressed_size, + true}; + font::font_file_t default_font{default_font_face, 0, 128}; + font_renderer.add_font(default_font); + for (const auto& data : files) map_files_names.emplace_back(std::to_string(data.data_points.begin()->bins.size())); @@ -220,7 +228,7 @@ void update(const blt::gfx::window_data& window_data) auto n = 2 * (v - min_act) / (max_act - min_act) - 1; v = n; } - BLT_TRACE("Min %f Max %f", min_act, max_act); +// BLT_TRACE("Min %f Max %f", min_act, max_act); for (auto [i, v] : blt::enumerate(som->get_array().get_map())) { @@ -245,6 +253,7 @@ void destroy(const blt::gfx::window_data&) global_matrices.cleanup(); resources.cleanup(); renderer_2d.cleanup(); + font_renderer.cleanup(); blt::gfx::cleanup(); BLT_INFO("Goodbye World!"); }