title: How does opengl texturing works?
body: <p>I have been playing with opengl for some time and i found texturing to be very interesting. I have a cube with a face selected, i can project that face to a 2d image and map the color in that image to the 3d model. How does this work? What algorithm is involved in this? In software like blender we can live edit the vertices in the 2d projection that gets automatically mapped to the 3d model. There are even options to unwrap, cube project, cylinder project etc.</p>
  
  <p><a href="https://i.stack.imgur.com/VIsi5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VIsi5.png" alt="enter image description here"></a> </p>
  
  <p>I am not sure if this is the right place to ask such a question. But i am asking it out of curiosity. </p>