Languages

Menu
Sites
Language

set lookat matrix in OpenGL ES 2.0

OpenGL ES 2.0 deprecate the GLU tools, we have following codes to replace the functionality of the tool gluLookAt().

Responses

1 Replies
Jean Yang

Added following judgement to make sure the up vector not parallel to forward line.

    //The UP vector must not be parallel to the line of sight from the eye point to the reference point.
    if((0 == sx)&&(0 == sy)&&(0 == sz))
     return;