(bind-func shader_update_camera
(lambda (shader:ShaderProgram* position target)
(let ((direction:float* (salloc 8))
(tmp:float* (pref-ptr direction 4)))
(vvsub position target 3 tmp)
(vnormalise tmp 3 direction)
(pset! direction 3 0.0)
(glUniform4fv (glGetUniformLocation (id shader) "CameraPos") 1 position)
(glUniform4fv (glGetUniformLocation (id shader) "CameraDir") 1 direction)
void)))