I need to map a texture on a 2D quad… so I have a bad texturing … when it’s not a square. I have find the projection matrix that transform the standard square in the quad… and It seems that if I load the matrix for the texture, the mapping should be perspective corrected ?
glMatrixMode(GL_TEXTURE);
glLoadMatrixf(matrix);
glMatrixMode(GL_MODELVIEW);
matrix is the projection matrix that map for example a standard square (for exemple : X1(0,0) X2(100,0) X3(100,100) X4(0,100) to a quad Y1(10,-5) Y2(45,20) Y3 (101,5) Y4(8,90)
the result seems not too far but it’s not exact for sure…
Best regards,
Yannick