I tried to clear canvas with transparent color before...but finally setting also panel background color helped! Thank you!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "Test");
tgui::Gui gui(window);
tgui::Panel::Ptr panel(gui);
panel->setSize(100,100);
panel->setPosition(100, 100);
tgui::Canvas::Ptr canvas(*panel);
canvas->setPosition(0, 0);
canvas->setSize(panel->getSize().x, panel->getSize().y);
sf::Texture tex;
// load some texture with alpha channel
sf::Sprite sprite;
sprite.setTexture(tex);
while(window.isOpen())
{
window.clear(sf::Color::Blue);
gui.draw();
canvas->clear();
canvas->draw(sprite);
canvas->display();
window.display();
}
}