Main Menu
Menu

Show posts

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

Messages - Pete

#1
Help requests / Re: Issue with canvas
01 June 2015, 00:18:02
I tried to clear canvas with transparent color before...but finally setting also panel background color helped! Thank you!
#2
Help requests / Re: Issue with canvas
31 May 2015, 23:54:07
Code (cpp) Select

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();
}
}


I want to achieve that the sections with alpha mask in sprite will work on scene drawn before before panel (in this case just blue color)
#3
Help requests / Issue with canvas
31 May 2015, 23:29:26
I have a following issue. I have a panel with canvas inside of it...into the canvas Im drawing a sprite as a background, mainly because I need to have some sections with alpha channel. The problem is that the channel is somehow not working. Sections with alpha channel are remaining black....btw Im drawing everything into the single rendertarget.