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

Author Topic: SFML 2.0 Help understanding sf::RenderWindow and sf::View  (Read 1086 times)

0 Members and 1 Guest are viewing this topic.

tx34

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML 2.0 Help understanding sf::RenderWindow and sf::View
« on: August 02, 2012, 05:03:30 am »
I was curious about the sf::RenderWindow API for accessing its view. Specifically I was wondering why the RenderWindow view cannot be accessed and modified directly. In my application I will be updating the view in potentially every frame, so it seems like a waste to have to copy the entire view object twice to modify one property. Of course it is not that big of a deal given it is not a heavy object. Was this decision made to simplify memory management?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.0 Help understanding sf::RenderWindow and sf::View
« Reply #1 on: August 02, 2012, 08:06:20 am »
It makes a lot of things easier. And since handling sf::View instances by copy is not a real problem (and will probably never be), I have no reason to change that. In SFML 1.6 they were handled by reference, and it was creating a lot of ownership problems.
Laurent Gomila - SFML developer