SFML community forums

Help => Window => Topic started by: PixelMuffin on July 15, 2012, 02:10:19 am

Title: Missing functions from window object when passed into a function
Post by: PixelMuffin on July 15, 2012, 02:10:19 am
Hi. I have a main function which creates all of the main objects in the game and the loop and then a render function. When I try to use functions I can use in my main loop window.draw(), window.clear() in my rendering function, they don't show up. Am I being an idiot here and have they been disabled/removed for a reason?
Title: Re: Missing functions from window object when passed into a function
Post by: G. on July 15, 2012, 02:13:25 am
You're probably using a sf::RenderWindow, but passing it as a sf::Window in your function.
Title: Re: Missing functions from window object when passed into a function
Post by: PixelMuffin on July 15, 2012, 02:24:59 am
You're probably using a sf::RenderWindow, but passing it as a sf::Window in your function.

That's exactly what I was doing. Thank you :D