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

Author Topic: sf::Image and sf::Texture create function messed up  (Read 3199 times)

0 Members and 1 Guest are viewing this topic.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
sf::Image and sf::Texture create function messed up
« on: April 01, 2012, 01:26:36 am »
Well the latest commit to SFML2 have messed up sf::Image and sf::Texture's create function making it impossible to create textures or images. This in it's own turn messed up the internal creation of textures and images for sf::Font so my entire example I was going to show up for rbSFML doesn't work because of that ^^

The concerning code is:
////////////////////////////////////////////////////////////
bool Texture::create(unsigned int width, unsigned int height)
{
    // Check if texture parameters are valid before creating it
    if ((m_size.x == 0) || (m_size.y == 0))
    {
        err() << "Failed to create texture, invalid size (" << m_size.x << "x" << m_size.y << ")" << std::endl;
        return false;
    }
   
    // ... more code...
}

I first thought this was a problem in rbSFML so took me some time to find it ^^
Anyway this was done with the most recent commit and is just a little mistake so thought it wasn't worth putting up on the issue tracker. Though on the odd chance that you would miss it I didn't want to just let it be left hanging for several days.


Edit: Oooh wait, seems to be only in sf::Texture. Though somehow it messes up with fonts so that it tries to create a 0x0 sf::Image so you get an error output.
« Last Edit: April 01, 2012, 01:29:54 am by Groogy »
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: sf::Image and sf::Texture create function messed up
« Reply #1 on: April 01, 2012, 10:01:24 am »
Oops! Thank you ;D
Laurent Gomila - SFML developer

 

anything