mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 23:23:34 +00:00
adding profiler
This commit is contained in:
@@ -20,6 +20,7 @@ namespace mlx
|
||||
|
||||
void GraphicsSupport::clearRenderData() noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_textures_to_render.clear();
|
||||
_pixel_put_pipeline.clear();
|
||||
_text_put_pipeline->clear();
|
||||
@@ -27,16 +28,19 @@ namespace mlx
|
||||
|
||||
void GraphicsSupport::pixelPut(int x, int y, uint32_t color) noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_pixel_put_pipeline.setPixel(x, y, color);
|
||||
}
|
||||
|
||||
void GraphicsSupport::stringPut(int x, int y, int color, std::string str)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_text_put_pipeline->put(x, y, color, str);
|
||||
}
|
||||
|
||||
void GraphicsSupport::texturePut(Texture* texture, int x, int y)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_textures_to_render.emplace_back(texture, x, y);
|
||||
auto it = std::find(_textures_to_render.begin(), _textures_to_render.end() - 1, _textures_to_render.back());
|
||||
if(it != _textures_to_render.end() - 1)
|
||||
@@ -45,6 +49,7 @@ namespace mlx
|
||||
|
||||
void GraphicsSupport::loadFont(const std::filesystem::path& filepath, float scale)
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
_text_put_pipeline->loadFont(filepath, scale);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user