make square shader accessable
parent
ac79aa80df
commit
f60ce3dc0b
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.25)
|
||||
include(FetchContent)
|
||||
|
||||
set(BLT_GRAPHICS_VERSION 1.1.7)
|
||||
set(BLT_GRAPHICS_VERSION 1.1.8)
|
||||
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
||||
|
||||
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
||||
|
|
|
@ -161,6 +161,7 @@ namespace blt::gfx
|
|||
std::unique_ptr<shader_t> point_shader;
|
||||
resource_manager& resources;
|
||||
matrix_state_manager& state;
|
||||
|
||||
// texture name -> draw info
|
||||
struct
|
||||
{
|
||||
|
@ -233,34 +234,53 @@ namespace blt::gfx
|
|||
|
||||
template <typename T, typename... P>
|
||||
void drawRectangle(const T& render_info, P... p)
|
||||
{ drawRectangleInternal(render_info, {p...}); }
|
||||
{
|
||||
drawRectangleInternal(render_info, {p...});
|
||||
}
|
||||
|
||||
template <typename T, typename... P>
|
||||
void drawPoint(const T& render_info, P... p)
|
||||
{ drawPointInternal(render_info, {p...}); }
|
||||
{
|
||||
drawPointInternal(render_info, {p...});
|
||||
}
|
||||
|
||||
template <typename T, typename... P>
|
||||
void drawLine(const T& render_info, P... p)
|
||||
{ drawLineInternal(render_info, {p...}); }
|
||||
{
|
||||
drawLineInternal(render_info, {p...});
|
||||
}
|
||||
|
||||
template <typename T, typename... P>
|
||||
void drawRectangle(const T& render_info, f32 z_index, P... p)
|
||||
{ drawRectangleInternal(render_info, {p...}, z_index); }
|
||||
{
|
||||
drawRectangleInternal(render_info, {p...}, z_index);
|
||||
}
|
||||
|
||||
template <typename T, typename... P>
|
||||
void drawPoint(const T& render_info, f32 z_index, P... p)
|
||||
{ drawPointInternal(render_info, {p...}, z_index); }
|
||||
{
|
||||
drawPointInternal(render_info, {p...}, z_index);
|
||||
}
|
||||
|
||||
template <typename T, typename... P>
|
||||
void drawLine(const T& render_info, f32 z_index, P... p)
|
||||
{ drawLineInternal(render_info, {p...}, z_index); }
|
||||
{
|
||||
drawLineInternal(render_info, {p...}, z_index);
|
||||
}
|
||||
|
||||
void render(i32 width, i32 height, bool transparency = true);
|
||||
|
||||
void cleanup();
|
||||
|
||||
[[nodiscard]] shader_t& get_square_shader() const
|
||||
{
|
||||
return *square_shader;
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t draw_count() const
|
||||
{ return draw.draw_count; }
|
||||
{
|
||||
return draw.draw_count;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue