I'm trying to draw a string in OpenGL with LWJGL from a texture atlas containing all chars next to another.
Now I'm adding for each char three vertices to the mesh, which is going to be rendered by
GL11.glDrawArrays(GL11.GL_TRIANGLE_STRIP, 0, text.getModel().getRawModel().getVertexCount());
For example I'm tyring to render the string "Thomas", that end's up as the following (with added offset to see the problem better):
As you can see, there is a strange "quad" between every char and i don't know why :-( I think that I'm adding to many vertices per char, but i got no idea to do it better...
Vertices (2D):
-0.3333333, 0.5875,
-0.24800003, 0.5875,
-0.3333333, 0.25,
-0.24800003, 0.25,
-0.11466664, 0.5875,
-0.029333353, 0.5875,
-0.11466664, 0.25,
-0.029333353, 0.25,
0.10399997, 0.5875,
0.18933332, 0.5875,
0.10399997, 0.25,
0.18933332, 0.25,
0.32266665, 0.5875,
0.408, 0.5875,
0.32266665, 0.25,
0.408, 0.25,
0.5413333, 0.5875,
0.62666667, 0.5875,
0.5413333, 0.25,
0.62666667, 0.25,
0.76, 0.5875,
0.84533334, 0.5875,
0.76, 0.25,
0.84533334, 0.25,
Texture Coords (2D):
0.23318386, 1.0,
0.23766816, 1.0,
0.23318386, 0.0,
0.23766816, 0.0,
0.32286996, 1.0,
0.32735425, 1.0,
0.32286996, 0.0,
0.32735425, 0.0,
0.3542601, 1.0,
0.35874438, 1.0,
0.3542601, 0.0,
0.35874438, 0.0,
0.34529147, 1.0,
0.3497758, 1.0,
0.34529147, 0.0,
0.3497758, 0.0,
0.29147983, 1.0,
0.29596412, 1.0,
0.29147983, 0.0,
0.29596412, 0.0,
0.3721973, 1.0,
0.37668163, 1.0,
0.3721973, 0.0,
0.37668163, 0.0