title: LookAt function: I'm going crazy
body: <p>I must do a homework and I try to implement a lookAt function. I tried in many ways but the only result I got is a blue screen. The rest of my program works greatly, infact if I use glm::lookAt all is good. This is my code:</p>
  
  <pre><code>mat4 Transform::lookAt(const vec3 &amp;eye, const vec3 &amp;center, const vec3 &amp;up) 
  {
      vec3 w(glm::normalize(eye - center)) ;
          vec3 u(glm::normalize(glm::cross(up, w)));
          vec3 v(glm::cross(w, u)) ;
      mat4 ret = mat4 (
          vec4 (u.x,v.x,w.x,0),
              vec4 (u.y,v.y,w.y,0),
              vec4 (u.z,v.z,w.z,0),
          vec4 (-u.x*eye.x-u.y*eye.y-u.z*eye.z,
               -v.x*eye.x-v.y*eye.y-v.z*eye.z,
               -w.x*eye.x-w.y*eye.y-w.z*eye.z,
               1)
      );
    return ret;
  </code></pre>