From 16a0fbc7dccb27900fb42b2f48604e18b8ffbb10 Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 29 Apr 2024 21:35:24 -0400 Subject: [PATCH] change interface to have internal functions --- CMakeLists.txt | 2 +- include/blt/gfx/renderer/batch_2d_renderer.h | 30 ++++++++++---------- libraries/BLT | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4565258..3a3e277 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -set(BLT_GRAPHICS_VERSION 0.11.3) +set(BLT_GRAPHICS_VERSION 0.11.4) 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 35fa8b1..656de87 100644 --- a/include/blt/gfx/renderer/batch_2d_renderer.h +++ b/include/blt/gfx/renderer/batch_2d_renderer.h @@ -140,56 +140,56 @@ namespace blt::gfx void create(); - inline void drawRectangle(std::string_view texture, const rectangle2d_t& rectangle, blt::f32 z_index = 0) + inline void drawRectangleInternal(std::string_view texture, const rectangle2d_t& rectangle, blt::f32 z_index = 0) { const static blt::vec4 empty{0, 0, 0, 1}; const static blt::vec4 full{1, 1, 1, 1}; complex_rectangles[texture][empty][full].emplace_back(-z_index, rectangle); } - inline void drawRectangle(const blt::vec4& color, const rectangle2d_t& rectangle, blt::f32 z_index = 0) + inline void drawRectangleInternal(const blt::vec4& color, const rectangle2d_t& rectangle, blt::f32 z_index = 0) { const static blt::vec4 empty{0, 0, 0, 0}; complex_rectangles[""][color][empty].emplace_back(-z_index, rectangle); } - inline void drawRectangle(const draw_state& draw_info, const rectangle2d_t& rectangle, blt::f32 z_index = 0) + inline void drawRectangleInternal(const draw_state& draw_info, const rectangle2d_t& rectangle, blt::f32 z_index = 0) { complex_rectangles[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(-z_index, rectangle); } - inline void drawLine(std::string_view texture, const line2d_t& line, blt::f32 z_index = 0) + inline void drawLineInternal(std::string_view texture, const line2d_t& line, blt::f32 z_index = 0) { const static blt::vec4 empty{0, 0, 0, 1}; const static blt::vec4 full{1, 1, 1, 1}; complex_lines[texture][empty][full].emplace_back(-z_index, line); } - inline void drawLine(const blt::vec4& color, const line2d_t& line, blt::f32 z_index = 0) + inline void drawLineInternal(const blt::vec4& color, const line2d_t& line, blt::f32 z_index = 0) { const static blt::vec4 empty{0, 0, 0, 0}; complex_lines[""][color][empty].emplace_back(-z_index, line); } - inline void drawLine(const draw_state& draw_info, const line2d_t& line, blt::f32 z_index = 0) + inline void drawLineInternal(const draw_state& draw_info, const line2d_t& line, blt::f32 z_index = 0) { complex_lines[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(-z_index, line); } - inline void drawPoint(std::string_view texture, const point2d_t& point, blt::f32 z_index = 0) + inline void drawPointInternal(std::string_view texture, const point2d_t& point, blt::f32 z_index = 0) { const static blt::vec4 empty{0, 0, 0, 1}; const static blt::vec4 full{1, 1, 1, 1}; complex_points[texture][empty][full].emplace_back(-z_index, point); } - inline void drawPoint(const blt::vec4& color, const point2d_t& point, blt::f32 z_index = 0) + inline void drawPointInternal(const blt::vec4& color, const point2d_t& point, blt::f32 z_index = 0) { const static blt::vec4 empty{0, 0, 0, 0}; complex_points[""][color][empty].emplace_back(-z_index, point); } - inline void drawPoint(const draw_state& draw_info, const point2d_t& point, blt::f32 z_index = 0) + inline void drawPointInternal(const draw_state& draw_info, const point2d_t& point, blt::f32 z_index = 0) { complex_points[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(-z_index, point); } @@ -197,37 +197,37 @@ namespace blt::gfx template inline void drawRectangle(const T& render_info, P... p) { - drawRectangle(render_info, {p...}); + drawRectangleInternal(render_info, {p...}); } template inline void drawPoint(const T& render_info, P... p) { - drawPoint(render_info, {p...}); + drawPointInternal(render_info, {p...}); } template inline void drawLine(const T& render_info, P... p) { - drawLine(render_info, {p...}); + drawLineInternal(render_info, {p...}); } template inline void drawRectangle(const T& render_info, blt::f32 z_index, P... p) { - drawRectangle(render_info, {p...}, z_index); + drawRectangleInternal(render_info, {p...}, z_index); } template inline void drawPoint(const T& render_info, blt::f32 z_index, P... p) { - drawPoint(render_info, {p...}, z_index); + drawPointInternal(render_info, {p...}, z_index); } template inline void drawLine(const T& render_info, blt::f32 z_index, P... p) { - drawLine(render_info, {p...}, z_index); + drawLineInternal(render_info, {p...}, z_index); } void render(bool transparency = true); diff --git a/libraries/BLT b/libraries/BLT index c8ce910..69e6a50 160000 --- a/libraries/BLT +++ b/libraries/BLT @@ -1 +1 @@ -Subproject commit c8ce910fe17ecbc64ad728aac731c1fda8e84c33 +Subproject commit 69e6a505d6dda11d4b510901a7b344315bbc5ebe