Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualEquivalent

Posted 06 April 2013 - 11:23 AM

Ah, found it, thank you


#2Equivalent

Posted 06 April 2013 - 11:09 AM

Thank you for your quick reply, I should've added this in the beginning I guess, but when I used:
const sf::Texture *textureToReturn;

 

Initialization()

{
    textureToReturn= &sb.getTexture(); (This is only created once during initialization of the object)
}

 

const sf::Texture RenderScreen::Draw() {
    return *textureToReturn;
}

 

It had the same result :/


#1Equivalent

Posted 06 April 2013 - 11:06 AM

Thank you for your quick reply, I should've added this in the beginning I guessed but when I used:
const sf::Texture *textureToReturn;

 

const sf::Texture *textureToReturn;


Initialization()

{
    textureToReturn= &sb.getTexture(); (This is only created once during initialization of the object)
}

 

const sf::Texture RenderScreen::Draw() {
    return *textureToReturn;
}

 

It had the same result :/


PARTNERS