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

Author Topic: Another View Question  (Read 5224 times)

0 Members and 1 Guest are viewing this topic.

Astrof

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Another View Question
« Reply #15 on: May 06, 2011, 09:04:17 am »
I think this is the whole const shenanigans that's giving me trouble.  I haven't touched C++ in a couple years and have been working mostly with python/java so forgive my noobish questions.  

So I get the View from the Window, modify it, then would I have to set it again?


Edit: Omg just remembered. Pointers.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Another View Question
« Reply #16 on: May 06, 2011, 09:09:53 am »
Quote
So I get the View from the Window, modify it, then would I have to set it again?

Yes, because everything is handled by copy now. If it helps, imagine that your view is an integer instead of an object. Primitive types are also handled by copy in languages like Python (whereas objects are handled by reference), so it may make more sense to you.
Laurent Gomila - SFML developer

Astrof

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Another View Question
« Reply #17 on: May 06, 2011, 09:18:12 am »
Ah that helps more.  
I'll just add a GetView at the beginning and SetView before my draw.  
Thanks for your help!