Skip to content

Instantly share code, notes, and snippets.

@timesqueezer
Forked from opatut/antialiasing_test.cpp
Created May 1, 2011 11:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timesqueezer/950439 to your computer and use it in GitHub Desktop.
Save timesqueezer/950439 to your computer and use it in GitHub Desktop.
SFML Antialiasing test
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <iostream>
int main() {
sf::RenderWindow app(sf::VideoMode(800,600,32), "lol", sf::Style::Close, sf::ContextSettings(24,8,4));
std::cout << "Antialiasing level: " << app.GetSettings().AntialiasingLevel << std::endl;
while(app.IsOpened()) {
sf::Event event;
while(app.PollEvent(event)) {
if(event.Type == sf::Event::Closed) {
app.Close();
}
}
app.Clear();
sf::Shape test = sf::Shape::Line(1,1,100,200, 1, sf::Color::White);
app.Draw(test);
app.Display();
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment