SFML community forums
General => General discussions => Topic started by: Madras on July 28, 2012, 05:21:51 am
-
Hi again! I have next greenhorn question. What's happened to AntiAliasing i SFML 2.0? I remember that in 1.6 version of SFML I didn't have any problems. I tried to add these lines before RenderWindow:
sf::ContextSettings settings;
settings.antialiasingLevel = 8;
.. Nothin' happened. :D
Attached photos (first not rotated arrow sprite, second rotated one):
http://madras.srvnet.info/not_rotated.png
http://madras.srvnet.info/rotated.png
Thanks. :)
-
You might need to set your sprite to use a smoothed texture. sf::Texture has a method called setSmooth(...). You can read about it more in the SFML documentation.
-
Indeed, antialiasing smoothes the geometry edges, not the textures pixels.
-
Thank you! Now my arrow is smoothed perfectly (see screenshot (http://madras.srvnet.info/smoothed.png)). Tell me, is it possible to determine 'setSmooth(true)' as default value for any new loaded texture (like in 1.6)? ;D
-
Tell me, is it possible to determine 'setSmooth(true)' as default value for any new loaded texture (like in 1.6)? ;D
If it were a good idea, Laurent wouldn't have changed it for SFML 2.
In my opinion, the default behavior should be to render images 1:1, without special filters. With the old semantics, there have been loads of forum threads because images were drawn in a distorted way.