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

Author Topic: color line SFML2  (Read 1331 times)

0 Members and 1 Guest are viewing this topic.

Romex

  • Newbie
  • *
  • Posts: 11
    • View Profile
color line SFML2
« on: March 30, 2012, 12:32:18 pm »
Hello,
sorry for silly question, but how to create color line in SFML2? VertexArray doesn't have setColor method.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: color line SFML2
« Reply #1 on: March 30, 2012, 12:37:23 pm »
Colors are in vertices.
vertexArray.append(sf::Vertex(p1, sf::Color::Red));
vertexArray.append(sf::Vertex(p2, sf::Color::Red));
Laurent Gomila - SFML developer

 

anything