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

Author Topic: [2.0 RC] View bug  (Read 2851 times)

0 Members and 1 Guest are viewing this topic.

SymegPL

  • Newbie
  • *
  • Posts: 13
    • View Profile
[2.0 RC] View bug
« on: January 27, 2013, 06:10:17 pm »
Hello! Sorry for my bad english.

I have problem with View class. When i apply new position, rotation etc. to view it works, but nothing changes on screen. It was only change when i use SetView method.
Exapmle:

window.GetView().Move(new Vector2f(5,5));//nothing changes on the screen

window.SetView(window.GetView().Move(new Vector2f(5,5)));//only now view was applied to the screen

It is bug or not?

Thanks for replies.
Utermiko
« Last Edit: January 27, 2013, 06:27:47 pm by Utermiko »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [2.0 RC] View bug
« Reply #1 on: January 27, 2013, 06:54:56 pm »
Yes, you need to call SetView to change the view. The fact that you can modify GetView() directly is just a limitation of the C# language (there's no const type).
Laurent Gomila - SFML developer

SymegPL

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [2.0 RC] View bug
« Reply #2 on: January 27, 2013, 07:08:38 pm »
But classes are passed by reference, not value.

@EDIT I saw on the source. GetView always create new "View" object.
Thank you.
« Last Edit: January 27, 2013, 07:11:52 pm by Utermiko »