Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Potential bug  (Read 1778 times)

0 Members and 1 Guest are viewing this topic.

billarhos

  • Newbie
  • *
  • Posts: 17
    • View Profile
Potential bug
« on: October 11, 2017, 09:14:09 pm »
Hi, i am facing a strange issue with timelinefx library. Everything is working just fine in debug until i compiled for release. All effects i used are renderred correct in debug but stretched in release. It may has to do with alpha channel.

I am using the latest sfml version with visual studio 2015.

The guy who port the c++ sfml port for timelinefx library (fradakilla) gave me a solution that is working for release and debug. But the previous code should worked out of the box.

I have create a repro project for everyone who is interested to invastigate this issue.

To work with the fixed code (that is working for both debug and release) uncomment #define FIXED_BY_FRADAKILA

http://www.mediafire.com/file/5v4mx4dgwwgw8k2/TimeLineFx.rar

//working correct both in debug  and release
bool SfmlImage::Load(const char *filename)
{
        _texture = new sf::Texture();

        std::string path = filename;

        sf::Image tmpImage;
        tmpImage.loadFromFile(path.c_str());
        tmpImage.createMaskFromColor(sf::Color::White);

        _texture->loadFromImage(tmpImage);
        _texture->setSmooth(true);

        return true;
}

//working correct only in debug
bool SfmlImage::Load( const char *filename )
{
    _texture = new sf::Texture();

    std::string path = filename;
        assert(_texture->loadFromFile(path.c_str()));

    _texture->setSmooth(true);

    return true;
}
 

thanks in advance

« Last Edit: October 20, 2017, 07:29:36 pm by billarhos »

 

anything