I am doing axis of graph by simple using sf::Vertex array.
const sf::Color AXIS_COLOR (sf::Color::Black);
sf::Vertex axis[] =
{
sf::Vertex (sf::Vector2f (0.f, GRAPH_SIZE/2), AXIS_COLOR),
sf::Vertex (sf::Vector2f (GRAPH_SIZE, GRAPH_SIZE/2), AXIS_COLOR),
sf::Vertex (sf::Vector2f (GRAPH_SIZE/2, 0.f), AXIS_COLOR),
sf::Vertex (sf::Vector2f (GRAPH_SIZE/2, GRAPH_SIZE), AXIS_COLOR),
};
// and draw it
window.draw (axis, 4, sf::Lines);
I am using antialiasing:
sf::ContextSettings settings;
settings.antialiasingLevel = 8;
sf::RenderWindow window ({SCREEN_WIDTH,SCREEN_HEIGHT},APPLICATION_NAME, WINDOW_STYLE, settings);
However the axis is practically gray and if I set antialiasing to 0, I have a black line.
Is this because of basic coordination use floats?
Is there a way to have both, really black and antialiasing?