I'm trying to draw text using the sf::VertexArray because then, my text is drawed in the same place and way as my sprites and its easier for me to manage things like draw order and its overal more consistent.
I have sprites working but with text it looks as if the vertices are in the wrong order (see attachment)
I have simply taken the origin sf::Text source code and modified it to fit my needs (I kept the vertex append order the same).
// Add a quad for the current character
m_vertices.append(Vertex(Vector2f(x + left - italic * top, y + top), m_color, Vector2f(u1, v1)));
m_vertices.append(Vertex(Vector2f(x + right - italic * top, y + top), m_color, Vector2f(u2, v1)));
m_vertices.append(Vertex(Vector2f(x + left - italic * bottom, y + bottom), m_color, Vector2f(u1, v2)));
m_vertices.append(Vertex(Vector2f(x + left - italic * bottom, y + bottom), m_color, Vector2f(u1, v2)));
m_vertices.append(Vertex(Vector2f(x + right - italic * top, y + top), m_color, Vector2f(u2, v1)));
m_vertices.append(Vertex(Vector2f(x + right - italic * bottom, y + bottom), m_color, Vector2f(u2, v2)));
for (size_t i = 0; i < m_vertices.getVertexCount(); i++)
m_batch->addVertex(m_vertices[i]);
Can anyone help me figure out the correct order to add the vertices?
(the text should spell "Hello!")