I try myself on Vertexes.
I have wrote a class which have a rectangle inside and a border around.
The main porpose of the border to be kind of shadow around the box but that is not the problem.
When i display the border it have black lines like some lines is missing, and i make the border of lines(
http://www.sfml-dev.org/documentation/2.1/classsf_1_1VertexArray.php)
In the first screenshot i have normal size window and there not so many black lines but in the second one maximized the window i got more of them.
code where i create the lines:
void Flat_Entity::create_border() //m_ is for member
{
int points_count = m_border_thick*5;
m_border.setPrimitiveType(sf::LinesStrip);
m_border.resize(points_count);
int increment_adress = 0; //increment for vector
int x_near = m_x + m_border_thick;
int y_near = m_y + m_border_thick;
int x_far = m_x + m_width - m_border_thick;
int y_far = m_y + m_height - m_border_thick;
for(int size_thick = 0; size_thick < m_border_thick; ++size_thick) //size_thick represents px
{
m_border[increment_adress++].position = sf::Vector2f(x_near-size_thick, y_near-size_thick); //for top-left corner
m_border[increment_adress++].position = sf::Vector2f(x_far+size_thick, y_near-size_thick); //for top-right corner
m_border[increment_adress++].position = sf::Vector2f(x_far+size_thick, y_far+size_thick); //for bottom-right corner
m_border[increment_adress++].position = sf::Vector2f(x_near-size_thick, y_far+size_thick); //for bottom-left corner
m_border[increment_adress++].position = sf::Vector2f(x_near-size_thick, y_near-size_thick); //again for top-left, close the way
}
for(int i = 0; i < increment_adress; ++i) //set color for border
m_border[i].color = sf::Color(200, 150, 100);
}
thanks for help