diff --git a/.idea/workspace (conflicted copy 2024-11-12 190649).xml b/.idea/workspace (conflicted copy 2024-11-12 190649).xml
deleted file mode 100644
index 9bc157a..0000000
--- a/.idea/workspace (conflicted copy 2024-11-12 190649).xml
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- {
- "useNewFormat": true
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "associatedIndex": 7
-}
-
-
-
-
-
- {
- "keyToString": {
- "CMake Application.COSC-4P80-Assignment-3.executor": "Run",
- "NIXITCH_NIXPKGS_CONFIG": "/etc/nix/nixpkgs-config.nix",
- "NIXITCH_NIX_CONF_DIR": "",
- "NIXITCH_NIX_OTHER_STORES": "",
- "NIXITCH_NIX_PATH": "/home/brett/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels",
- "NIXITCH_NIX_PROFILES": "/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/brett /home/brett/.local/state/nix/profile /nix/profile /home/brett/.nix-profile",
- "NIXITCH_NIX_REMOTE": "",
- "NIXITCH_NIX_USER_PROFILE_DIR": "/nix/var/nix/profiles/per-user/brett",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.cidr.known.project.marker": "true",
- "RunOnceActivity.readMode.enableVisualFormatting": "true",
- "cf.advertisement.text.has.clang-format": "true",
- "cf.first.check.clang-format": "false",
- "cidr.known.project.marker": "true",
- "git-widget-placeholder": "main",
- "last_opened_file_path": "/home/brett/Documents/Brock/CS 4P80/COSC-4P80-Assignment-3",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "settings.editor.selected.configurable": "preferences.pluginManager",
- "vue.rearranger.settings.migration": "true"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1730483030448
-
-
- 1730483030448
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b158e6f..64f799a 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.13)
+project(COSC-4P80-Assignment-3 VERSION 0.0.14)
include(FetchContent)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
@@ -42,3 +42,9 @@ if (${ENABLE_TSAN} MATCHES ON)
target_compile_options(COSC-4P80-Assignment-3 PRIVATE -fsanitize=thread)
target_link_options(COSC-4P80-Assignment-3 PRIVATE -fsanitize=thread)
endif ()
+
+if (EMSCRIPTEN)
+ message("Linking Emscripten")
+ set(BLT_PRELOAD_PATH ../data)
+ include(lib/blt-with-graphics/cmake/link_flags.cmake)
+endif ()
\ No newline at end of file
diff --git a/lib/blt-with-graphics b/lib/blt-with-graphics
index ed6f360..f75cbbb 160000
--- a/lib/blt-with-graphics
+++ b/lib/blt-with-graphics
@@ -1 +1 @@
-Subproject commit ed6f36020e9388de546fca3a7ea791b195f24664
+Subproject commit f75cbbb10c3c5c482182def61365e6b7fe6da3af
diff --git a/src/main.cpp b/src/main.cpp
index 2035def..ddea90a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -7,8 +7,6 @@
#include "blt/gfx/renderer/font_renderer.h"
#include "blt/gfx/renderer/camera.h"
#include "blt/std/random.h"
-#include "blt/profiling/profiler_v2.h"
-#include "blt/gfx/font/font_awesome_defines.h"
#include
#include
#include
@@ -72,46 +70,12 @@ void init(const blt::gfx::window_data&)
using namespace blt::gfx;
BLT_INFO("Hello World!");
- const unsigned char rickRollLyrics[] = {
- 87, 101, 39, 114, 101, 32, 110, 111, 32, 115, 116, 114, 97, 110, 103, 101, 114, 115, 32, 116, 111, 32, 108, 111, 118, 101, 44, 10,
- 89, 111, 117, 32, 107, 110, 111, 119, 32, 116, 104, 101, 32, 114, 117, 108, 101, 115, 32, 97, 110, 100, 32, 115, 111, 32, 100, 111, 32,
- 73, 46, 10,
- 65, 32, 102, 117, 108, 108, 32, 99, 111, 109, 109, 105, 116, 109, 101, 110, 116, 39, 115, 32, 119, 104, 97, 116, 32, 73, 39, 109, 32, 116,
- 104, 105, 110, 107, 105, 110, 103, 32, 111, 102, 44, 10,
- 89, 111, 117, 32, 119, 111, 117, 108, 100, 110, 39, 116, 32, 103, 101, 116, 32, 116, 104, 105, 115, 32, 102, 114, 111, 109, 32, 97, 110,
- 121, 32, 111, 116, 104, 101, 114, 32, 103, 117, 121, 46, 10,
- 73, 32, 106, 117, 115, 116, 32, 119, 97, 110, 110, 97, 32, 116, 101, 108, 108, 32, 121, 111, 117, 32, 104, 111, 119, 32, 73, 39, 109, 32,
- 102, 101, 101, 108, 105, 110, 103, 44, 10,
- 71, 111, 116, 116, 97, 32, 109, 97, 107, 101, 32, 121, 111, 117, 32, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 46, 10,
- 78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 103, 105, 118, 101, 32, 121, 111, 117, 32, 117, 112, 44, 10,
- 78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 108, 101, 116, 32, 121, 111, 117, 32, 100, 111, 119, 110, 44, 10,
- 78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 114, 117, 110, 32, 97, 114, 111, 117, 110, 100, 32, 97, 110, 100, 32, 100, 101,
- 115, 101, 114, 116, 32, 121, 111, 117, 46, 10,
- 78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 109, 97, 107, 101, 32, 121, 111, 117, 32, 99, 114, 121, 44, 10,
- 78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 115, 97, 121, 32, 103, 111, 111, 100, 98, 121, 101, 44, 10,
- 78, 101, 118, 101, 114, 32, 103, 111, 110, 110, 97, 32, 116, 101, 108, 108, 32, 97, 32, 108, 105, 101, 32, 97, 110, 100, 32, 104, 117,
- 114, 116, 32, 121, 111, 117, 46, 10, '\0'
- };
-
- std::string rick{reinterpret_cast(rickRollLyrics)};
- auto lines = blt::string::split_sv(rick, '\n');
-
global_matrices.create_internals();
resources.load_resources();
renderer_2d.create();
- font_renderer.create_default(2048);
-// font::font_face_t default_font_face{reinterpret_cast(fontAwesomeSolid_compressed_data), fontAwesomeSolid_compressed_size, true};
-// font::font_file_t default_font{default_font_face, 0, 128};
-// font_renderer.add_font(default_font);
+ font_renderer.create_default(250, 2048);
- BLT_START_INTERVAL("Text", "TextGen");
- font_renderer.create_text("Parker is a faggot", 96)->setPosition(200, 200).setScale(0.1, 0.1);
- for (const auto& [index, line] : blt::enumerate(lines))
- {
- font_renderer.create_text(line, 250)->setPosition(200, 300 + index * 96 * 0.1).setScale(0.1, 0.1);
- }
-// font_renderer.create_text("Parker is a faggot", 96)->setPosition(200, 300);
- BLT_END_INTERVAL("Text", "TextGen");
+ font_renderer.create_text("Hello There \"I'm a boy", 13)->setPosition(50, 500);
for (const auto& data : files)
map_files_names.emplace_back(std::to_string(data.data_points.begin()->bins.size()));
@@ -260,10 +224,10 @@ void update(const blt::gfx::window_data& window_data)
draw_height + neuron_scale * 2 + v.get_y() * neuron_scale + neuron_scale, neuron_scale});
}
+ font_renderer.render_text("Wow I hate you too", 32)->setPosition(100, 300);
+
renderer_2d.render(window_data.width, window_data.height);
- BLT_START_INTERVAL("Text", "TextRender");
font_renderer.render();
- BLT_END_INTERVAL("Text", "TextRender");
}
void destroy(const blt::gfx::window_data&)
@@ -273,7 +237,6 @@ void destroy(const blt::gfx::window_data&)
renderer_2d.cleanup();
font_renderer.cleanup();
blt::gfx::cleanup();
- BLT_PRINT_PROFILE("Text");
BLT_INFO("Goodbye World!");
}