The OpenGL model is a pipeline model that is inherently 3D, but easily accomodates 2D applications.
glVertex3f |
---|
void glVertex2f(GLfloat x, GLfloat y); |
---|
void glVertex3f(GLfloat x, GLfloat y, GLfloat z); |
void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); |
void glVertex3i(GLint x, GLint y, GLint z); |
void glVertex3fv(GLfloat v[3]); |
void glBegin(GLenum mode);
...list of vertices... glEnd(void); |
void glBegin(GL_LINES);
glVertex3f(0.0, 0.0, 0.0); glVertex3f(1.0, 1.0, 1.0); glEnd(void); |
gluLookAt( eyePosition, LookAtPoint, UpVector) |
---|
(1) gluFrustum (xmin, xmax, ymin, ymax, zmin, zmax) |
(2) gluPerspective( fov, aspect, near, far) |
(3) gluOrtho(left, right, bot, top, znear, zfar) |
(4) gluOrtho2D(xmin, xmax, ymin, ymax, zmin, zmax) |
model view, projection and texture matrices. |
---|
glMatrixMode( MODE ) |
---|
[PREVIOUS LECTURE] [NEXT LECTURE] [ALL LECTURES] [CLASS PAGE]