Suppose that we have a triangle mesh without information about normals and texture coordinates. (Basically an OBJ file with only vertices and face elements).
The objective is to show something decent using Opengl with a program written in C. To calculate the normals of every triangle is easy...
But what about texture mapping? Can anyone recommend me a simple algorithm/documentation/resource to map the normalized UV coordinates of an image to a generic mesh of triangles?
(For a mesh with a single triangle it is easy, ex: [0][0], [1][0], [0][1])
The result doesn't have to be perfect, even professional softwares can't do that without UV unwrapping and UV seams.