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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tylradm5

Pages: [1]
1
Thanks Laurent,
In the process of creating a complete and minimal code and having that work, I stumbled upon the problem in my original code.

2
Graphics / Setting window view from a class derived from drawable
« on: May 12, 2015, 03:48:53 am »
I have a class that is derived from Drawble
class UserInterface : public sf::Drawable
And the virtual function draw

Is it possible to change the target view from the draw function like this?
void UserInterface::draw(sf::RenderTarget& target, sf::RenderStates states) const {
  target.setView(newview);
  target.draw(somesprite);
}

This is what I've tried but nothing will successfully draw to newview. :(
I can provide more information if needed.
Thanks for any help :)

Pages: [1]