I am about to go mad because of texture mapping of openGL. It nevers maps the right thing, please have a look.
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, speed.texID);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glBegin(GL_QUADS);
glTexCoord2f(1,0);
glVertex2f(210, 638); //Top-Left
glTexCoord2f(1,1);
glVertex2f(210, 438); //Top-Right
glTexCoord2f(0,1);
glVertex2f(10, 438); //Bottom-Right
glTexCoord2f(0,0);
glVertex2f(10, 638); //Bottom-Left
glEnd();
glDisable(GL_TEXTURE_2D);
After this code output image becomes this:
But I want it to be like this:
When I change the texture to something else, it maps it correctly but apparently not this one. Why do you think this could be?