mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
yes
This commit is contained in:
@@ -49,8 +49,6 @@ namespace mlx
|
||||
int m_id;
|
||||
|
||||
bool m_has_window;
|
||||
|
||||
bool m_insert_new_pixel_put_texture = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -8,21 +8,18 @@ namespace mlx
|
||||
MLX_PROFILE_FUNCTION();
|
||||
p_scene->ResetSprites();
|
||||
m_put_pixel_manager.ResetRenderData();
|
||||
m_insert_new_pixel_put_texture = true;
|
||||
m_draw_layer = 0;
|
||||
}
|
||||
|
||||
void GraphicsSupport::PixelPut(int x, int y, std::uint32_t color) noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
NonOwningPtr<Texture> texture = m_put_pixel_manager.DrawPixel(x, y, m_insert_new_pixel_put_texture, color);
|
||||
NonOwningPtr<Texture> texture = m_put_pixel_manager.DrawPixel(x, y, m_draw_layer, color);
|
||||
if(texture)
|
||||
{
|
||||
Sprite& new_sprite = p_scene->CreateSprite(texture);
|
||||
new_sprite.SetPosition(Vec2f{ 0.0f, 0.0f });
|
||||
m_draw_layer++;
|
||||
}
|
||||
m_insert_new_pixel_put_texture = false;
|
||||
}
|
||||
|
||||
void GraphicsSupport::StringPut(int x, int y, std::uint32_t color, std::string str)
|
||||
@@ -42,14 +39,10 @@ namespace mlx
|
||||
{
|
||||
Sprite& new_sprite = p_scene->CreateSprite(texture);
|
||||
new_sprite.SetPosition(Vec2f{ static_cast<float>(x), static_cast<float>(y) });
|
||||
m_insert_new_pixel_put_texture = true;
|
||||
m_draw_layer++;
|
||||
}
|
||||
else if(!p_scene->IsTextureAtGivenDrawLayer(texture, m_draw_layer))
|
||||
{
|
||||
p_scene->BringToFront(std::move(sprite));
|
||||
m_insert_new_pixel_put_texture = true;
|
||||
}
|
||||
m_draw_layer++;
|
||||
}
|
||||
|
||||
void GraphicsSupport::LoadFont(const std::filesystem::path& filepath, float scale)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace mlx
|
||||
|
||||
private:
|
||||
static MemManager* s_instance;
|
||||
inline static std::list<void*> s_blocks;
|
||||
inline static std::vector<void*> s_blocks;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user