SFML community forums
Help => Graphics => Topic started by: Ancurio on January 01, 2013, 04:34:15 pm
-
Just a small confusing thing that I noticed, but why is 'display()' not a pure virtual function
of sf::RenderTarget? It has the same signature in both RenderTexture and RenderWindow o.o
-
Because it's a virtual function of sf::Window.
In fact, RenderTexture::display() has the same name as RenderWindow::display() because the usage is similar, but:
- it's not required at RenderTarget level
- internally it does a totally different thing
-
Ah, I see, thanks.
Yeah, you're right, as far as I can tell RenderWindow::display() flips buffers,
whereas the single-buffered RenderTexture just corrects the Y-axis.
The reason I asked was because I needed a "finalize draw" method that works from RenderTarget,
but it's trivial to do that myself ^^