diff --git a/CMakeLists.txt b/CMakeLists.txt index 99ed4f3..1552861 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -set(BLT_GRAPHICS_VERSION 0.11.6) +set(BLT_GRAPHICS_VERSION 0.11.7) set(BLT_GRAPHICS_TEST_VERSION 0.0.1) project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION}) diff --git a/include/blt/gfx/renderer/batch_2d_renderer.h b/include/blt/gfx/renderer/batch_2d_renderer.h index 656de87..96c1769 100644 --- a/include/blt/gfx/renderer/batch_2d_renderer.h +++ b/include/blt/gfx/renderer/batch_2d_renderer.h @@ -93,9 +93,13 @@ namespace blt::gfx // texture to use std::string texture_name; // color to use - blt::vec4 color; + blt::color4 color; // how much to blend the texture into the color? note blending is always additive! - blt::vec4 blend; + blt::color4 blend; + // should we outline this object? + bool outline; + // what color should we outline with? + blt::color4 outline_color; }; class batch_renderer_2d diff --git a/libraries/BLT b/libraries/BLT index 86fd4a2..133728b 160000 --- a/libraries/BLT +++ b/libraries/BLT @@ -1 +1 @@ -Subproject commit 86fd4a2a9aa18b4dbe8b3688849f7ef81d54f27c +Subproject commit 133728b64100292779df64436c51c61317f608f5 diff --git a/src/blt/gfx/window.cpp b/src/blt/gfx/window.cpp index c93b9df..fa6eb8f 100644 --- a/src/blt/gfx/window.cpp +++ b/src/blt/gfx/window.cpp @@ -151,10 +151,12 @@ namespace blt::gfx void loop(void* arg) { - const auto& data = *((window_data*) arg); + auto& data = *((window_data*) arg); /* -- Get the current framebuffer size, update the global width/height state, along with OpenGL viewport -- */ glfwGetFramebufferSize(window_state.window, &window_state.width, &window_state.height); glViewport(0, 0, window_state.width, window_state.height); + data.width = window_state.width; + data.height = window_state.height; // TODO: user option for this glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);