[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glVertex Subroutine

Purpose

Specifies a vertex.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glVertex2d(GLdouble X, 
     GLdouble Y)
void glVertex2f(GLfloat X, 
    GLfloat Y)
void glVertex2i(GLint X, 
    GLint Y)
void glVertex2s(GLshort X, 
     GLshort Y)
void glVertex3d(GLdouble X, 
     GLdouble Y,
     GLdouble Z)
void glVertex3f(GLfloat X, 
    GLfloat Y,
    GLfloat Z)
void glVertex3i(GLint X, 
    GLint Y,
    GLint Z)
void glVertex3s(GLshort X, 
     GLshort Y,
     GLshort Z)
void glVertex4d(GLdouble X, 
     GLdouble Y,
     GLdouble Z,
     GLdouble W)
void glVertex4f(GLfloat X, 
    GLfloat Y,
    GLfloat Z,
    GLfloat W)
void glVertex4i(GLint X, 
   GLint Y,
   GLint Z,
   GLint W)
void glVertex4s(GLshort X, 
    GLshort Y,
    GLshort Z,
    GLshort W)
void glVertex2dv(const GLdouble *V)
void glVertex2fv(const GLfloat *V)
void glVertex2iv(const GLint *V)
void glVertex2sv(const GLshort *V)
void glVertex3dv(const GLdouble *V)
void glVertex3fv(const GLfloat *V)
void glVertex3iv(const GLint *V)
void glVertex3sv(const GLshort *V)
void glVertex4dv(const GLdouble *V)
void glVertex4fv(const GLfloat *V)
void glVertex4iv(const GLint *V)
void glVertex4sv(const GLshort *V)

Parameters

X, Y, Z, W Specify X, Y, Z, and W coordinates of a vertex. Not all parameters are present in all forms of the command.
V Specifies a pointer to an array of two, three, or four elements. The elements of a two-element array are X and Y. The elements of a three-element array are X, Y, and Z. The elements of a four-element array are X, Y, Z, and W.

Description

The glVertex subroutines are used within the glBegin and glEnd subroutine pairs to specify point, line, and polygon vertices. The current color, normal, and texture coordinates are associated with the vertex when glVertex is called.

When only X and Y are specified, Z defaults to 0.0 and W defaults to 1.0. When X, Y, and Z are specified, W defaults to 1.0.

Notes

Calling glVertex outside of a glBegin/glEnd subroutine pair results in undefined behavior.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glCallList subroutine, glColor subroutine, glEdgeFlag subroutine, glEvalCoord subroutine, glIndex subroutine, glMaterial subroutine, glNormal subroutine, glRect subroutine, glTexCoord subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]