working out of the third layer of hell

current progress:
- graph edges highlighting (Graphs)
- postprocessing (BLT_GRAPHICS)
- template engine (BLT)
^ we are here
main
Brett 2024-05-09 13:49:27 -04:00
parent 367bd8c8b8
commit 7bba09ec70
3 changed files with 43 additions and 3 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(graphs VERSION 0.0.29)
project(graphs VERSION 0.0.30)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)

@ -1 +1 @@
Subproject commit 7c61323a05084e46ee8787750caa6f52aa9a099d
Subproject commit eaf15046b4cab4ef0c5a9ba96c2d4e2d81ae6e73

View File

@ -28,9 +28,10 @@
#include <blt/std/time.h>
#include <blt/math/log_util.h>
#include <blt/gfx/input.h>
#include <blt/parse/templating.h>
#include <graph_base.h>
#include <force_algorithms.h>
#include <blt/gfx/renderer/shaders/pp_screen.frag>
blt::gfx::matrix_state_manager global_matrices;
blt::gfx::resource_manager resources;
@ -510,8 +511,47 @@ void update(const blt::gfx::window_data& data)
fps = 1 / ft;
}
void process_string(const std::string& str)
{
BLT_DEBUG(str);
auto results = blt::template_engine_t::process_string(str);
if (results)
{
auto val = results.value();
for (auto& v : val)
{
BLT_TRACE_STREAM << (blt::template_token_to_string(v.type));
}
BLT_TRACE_STREAM << "\n";
for (auto& v : val)
{
BLT_TRACE("{%s: %s}", blt::template_token_to_string(v.type).c_str(), std::string(v.token).c_str());
}
} else
{
auto error = results.error();
switch (error)
{
case blt::template_tokenizer_failure_t::MISMATCHED_CURLY:
BLT_ERROR("Tokenizer Failure: Mismatched curly");
break;
case blt::template_tokenizer_failure_t::MISMATCHED_PAREN:
BLT_ERROR("Tokenizer Failure: Mismatched parenthesis");
break;
case blt::template_tokenizer_failure_t::MISMATCHED_QUOTE:
BLT_ERROR("Tokenizer Failure: Mismatched Quotes");
break;
}
}
BLT_DEBUG("--------------------------");
}
int main(int, const char**)
{
blt::template_engine_t templateEngine;
return 0;
blt::gfx::init(blt::gfx::window_data{"Graphing Lovers United", init, update, 1440, 720}.setSyncInterval(1));
global_matrices.cleanup();
resources.cleanup();