Why does my texture mapped triangle look so bad?

This is the “brick” I would like to map to my triangle:

[ATTACH=CONFIG]1754[/ATTACH]

After mapping it, I get this ugly result:

[ATTACH=CONFIG]1755[/ATTACH]

My triangle and map coordinates are defined like this:


         ///poistion            texcoord
        0.0f,  1.0f,  0.0f,     0.5f, 0.7f,
       -1.0f, -1.0f,  1.0f,     0.0f, 0.0f,
        1.0f, -1.0f,  1.0f,     1.0f, 1.0f,

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

Did you pull those numbers out of thin air? The first set of texture coordinates is fairly close to the line between the other two, so you have a very short, wide triangle in texture space which is being mapped to a (relatively) much taller triangle. This results in the texture being stretched vertically.

Jesus, I need to pay more attention of what I am doing. I did wrong the last coordinate. Thank you btw <3