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

Author Topic: Missing functions from window object when passed into a function  (Read 2476 times)

0 Members and 1 Guest are viewing this topic.

PixelMuffin

  • Newbie
  • *
  • Posts: 18
    • View Profile
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?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Missing functions from window object when passed into a function
« Reply #1 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.

PixelMuffin

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Missing functions from window object when passed into a function
« Reply #2 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