Transformation in OpenGL
with Examples |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
glMatrixMode(GL_MODELVIEW);
glMatrixMode(GL_PROJECTION);
gluLookAt()
glTranslate*()
,
glScale*()
, glRotate*()
glOrtho(left, right, bottom, top, near, far)
glFrustum(fovy, aspect, zNear, zFar)
fovy
is the field of view (in degrees)
in the \(y\) direction, aspect
is
the aspect ration that determines the FOV in the
\(x\) direction, zNear
is the positive
distance from the viewer to the near clipping plane, and
zFar
is the positive
distance from the viewer to the far clipping plane
glPushMatrix()
and glPopMatrix()
)
is important and requires careful thought