fix issue with width/height not being updated
parent
7d2028cc55
commit
756b6a636e
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
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)
|
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
||||||
|
|
||||||
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
||||||
|
|
|
@ -93,9 +93,13 @@ namespace blt::gfx
|
||||||
// texture to use
|
// texture to use
|
||||||
std::string texture_name;
|
std::string texture_name;
|
||||||
// color to use
|
// color to use
|
||||||
blt::vec4 color;
|
blt::color4 color;
|
||||||
// how much to blend the texture into the color? note blending is always additive!
|
// 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
|
class batch_renderer_2d
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 86fd4a2a9aa18b4dbe8b3688849f7ef81d54f27c
|
Subproject commit 133728b64100292779df64436c51c61317f608f5
|
|
@ -151,10 +151,12 @@ namespace blt::gfx
|
||||||
|
|
||||||
void loop(void* arg)
|
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 -- */
|
/* -- 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);
|
glfwGetFramebufferSize(window_state.window, &window_state.width, &window_state.height);
|
||||||
glViewport(0, 0, 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
|
// TODO: user option for this
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue