#pragma once #include namespace mlx { void GraphicsSupport::ResetRenderData() noexcept { MLX_PROFILE_FUNCTION(); p_scene->ResetSprites(); m_put_pixel_manager.ResetRenderData(); m_insert_new_pixel_put_texture = true; } void GraphicsSupport::PixelPut(int x, int y, std::uint32_t color) noexcept { MLX_PROFILE_FUNCTION(); NonOwningPtr texture = m_put_pixel_manager.DrawPixel(x, y, m_insert_new_pixel_put_texture, color); if(texture) { Sprite& new_sprite = p_scene->CreateSprite(texture); new_sprite.SetPosition(Vec2f{ 0.0f, 0.0f }); } m_insert_new_pixel_put_texture = false; } void GraphicsSupport::StringPut(int x, int y, std::uint32_t color, std::string str) { MLX_PROFILE_FUNCTION(); (void)x; (void)y; (void)color; (void)str; } void GraphicsSupport::TexturePut(NonOwningPtr texture, int x, int y) { MLX_PROFILE_FUNCTION(); NonOwningPtr sprite = p_scene->GetSpriteFromTextureAndPosition(texture, Vec2f{ static_cast(x), static_cast(y) }); if(!sprite) { Sprite& new_sprite = p_scene->CreateSprite(texture); new_sprite.SetPosition(Vec2f{ static_cast(x), static_cast(y) }); m_insert_new_pixel_put_texture = true; } else p_scene->BringToFront(std::move(sprite)); } void GraphicsSupport::LoadFont(const std::filesystem::path& filepath, float scale) { MLX_PROFILE_FUNCTION(); (void)filepath; (void)scale; } void GraphicsSupport::TryEraseSpritesInScene(NonOwningPtr texture) noexcept { MLX_PROFILE_FUNCTION(); p_scene->TryEraseSpriteFromTexture(texture); } }