1
Feature requests / RenderTarget::SetView()
« on: October 17, 2010, 10:15:35 pm »
Hi!
I find it confusing that RenderTarget::SetView(const View& view);
stores a pointer to view, instead of copying it.
Thus I have to keep the View object around to keep the pointer valid:
I find it confusing that RenderTarget::SetView(const View& view);
stores a pointer to view, instead of copying it.
Thus I have to keep the View object around to keep the pointer valid:
Code: [Select]
void canvas::resize(int width, int height) {
static sf::View view;
sf::FloatRect canvasRect(0, 0, width, height);
view.SetFromRect(canvasRect);
SetView(view);
}