SFML forum,
I think this would related to a window problem.
I'm using the sheetRect command successfully in the main flow of my program
but when I pass it to a function it is grayed out and doesn't work. The
compiler doesn't complain and everything runs Ok.
here's the function declaration:
void drawToWindow(sf::RenderWindow &window, sf::IntRect &sheetRect);
here's the function call:
drawToWindow(window, sheetRect);
here's the function:
void drawToWindow(sf::RenderWindow &window, sf::IntRect &sheetRect)
{
sheetRect.top = 0;
sheetRect.left = 0;
suits.setTextureRect(sheetRect);
suits.setPosition(50,1);
window.clear(sf::Color::Green);
window.draw(suits);
window.draw(text);
window.display();
}
The window commands work but not the sheetRects are grayed out?
As I stated this all works outside of the function.
jerryd