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

Author Topic: Antialiasing not working  (Read 966 times)

0 Members and 1 Guest are viewing this topic.

songshu007

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Antialiasing not working
« on: May 21, 2022, 09:42:46 am »
this is my code
sf::ContextSettings settings;
        settings.antialiasingLevel = 8;
        sf::RenderWindow window(sf::VideoMode(800, 600), "Hello", sf::Style::Default, settings);
        window.setFramerateLimit(60);

        std::cout << "Antialiasing level: " << window.getSettings().antialiasingLevel << std::endl;
 
This image is antialiasing 0 and 8 levels
I don't see any antialiasing effect

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Antialiasing not working
« Reply #1 on: May 21, 2022, 09:55:27 am »
Are you rendering an image or shapes?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

songshu007

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Antialiasing not working
« Reply #2 on: May 21, 2022, 10:04:31 am »
Yes,I found a lot of information on the Internet, but none of them solved my problem. The value mentioned is that when I adjust the image rendering quality in the graphics card settings, it will affect the sfml, but I want to set the anti-aliasing separately in the sfml, but it Not working

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10846
    • View Profile
    • development blog
    • Email
Re: Antialiasing not working
« Reply #3 on: May 21, 2022, 10:54:43 am »
"Yes" is not a valid answer to the question whether you're rendering an image or shapes. :D

Anti-aliasing smoothes the edges of shapes, but it won't make your images sharper.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

songshu007

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Antialiasing not working
« Reply #4 on: May 21, 2022, 11:16:09 am »
oh sorry i meant i was rendering shapes not images