main
Brett 2024-04-14 17:37:17 -04:00
parent 8943558109
commit 15c2729faa
2 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.25)
set(BLT_GRAPHICS_VERSION 0.9.8)
set(BLT_GRAPHICS_VERSION 0.9.9)
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})

View File

@ -144,54 +144,54 @@ namespace blt::gfx
{
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);
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)
{
const static blt::vec4 empty{0, 0, 0, 0};
complex_rectangles[""][color][empty].emplace_back(z_index, rectangle);
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)
{
complex_rectangles[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(z_index, rectangle);
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)
{
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);
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)
{
const static blt::vec4 empty{0, 0, 0, 0};
complex_lines[""][color][empty].emplace_back(z_index, line);
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)
{
complex_lines[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(z_index, line);
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)
{
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);
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)
{
const static blt::vec4 empty{0, 0, 0, 0};
complex_points[""][color][empty].emplace_back(z_index, point);
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)
{
complex_points[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(z_index, point);
complex_points[draw_info.texture_name][draw_info.color][draw_info.blend].emplace_back(-z_index, point);
}
template<typename T, typename... P>