better naming and removed todo🤓

This commit is contained in:
Namonay
2024-10-24 05:30:37 +02:00
parent 1ec2f72d26
commit 2dadf5d29a
2 changed files with 5 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ namespace mlx
int m_id;
bool m_has_window;
bool m_putpixel_called = false;
bool m_pixelput_called = false;
};
}

View File

@@ -9,8 +9,7 @@ namespace mlx
p_scene->ResetSprites();
m_put_pixel_manager.ResetRenderData();
m_draw_layer = 0;
m_putpixel_called = false;
// PixelPut(0, 0, 0x00000000); // bozoman solution FIXME
m_pixelput_called = false;
}
void GraphicsSupport::PixelPut(int x, int y, std::uint32_t color) noexcept
@@ -19,7 +18,7 @@ namespace mlx
NonOwningPtr<Texture> texture = m_put_pixel_manager.DrawPixel(x, y, m_draw_layer, color);
if(texture)
{
m_putpixel_called = true;
m_pixelput_called = true;
Sprite& new_sprite = p_scene->CreateSprite(texture);
new_sprite.SetPosition(Vec2f{ 0.0f, 0.0f });
}
@@ -43,10 +42,10 @@ namespace mlx
Sprite& new_sprite = p_scene->CreateSprite(texture);
new_sprite.SetPosition(Vec2f{ static_cast<float>(x), static_cast<float>(y) });
if (m_putpixel_called)
if(m_pixelput_called)
{
m_draw_layer++;
m_putpixel_called = false;
m_pixelput_called = false;
}
}
else if(!p_scene->IsTextureAtGivenDrawLayer(texture, m_draw_layer))