Skip to content

Instantly share code, notes, and snippets.

@opatut
Created March 26, 2011 11:35
Show Gist options
  • Save opatut/888217 to your computer and use it in GitHub Desktop.
Save opatut/888217 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.GetEvent(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