Method GL.glVertex()
- Method
glVertex
voidglVertex(float|intx,float|inty,float|int|voidz,float|int|voidw)
voidglVertex(array(float|int)v)- Description
glVertex commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices. The current color, normal, texture coordinates, and fog coordinate are associated with the vertex when glVertex is called.
When only x and y are specified, z defaults to 0 and w defaults to 1. When x, y, and z are specified, w defaults to 1.
- Parameter
x - Parameter
y - Parameter
z - Parameter
w Specify x, y, z, and w coordinates of a vertex. Not all parameters are present in all forms of the command.
- Parameter
v Specifies an array of two, three, or four elements. The elements of a two-element array are x and y; of a three-element array, x, y, and z; and of a four-element array, x, y, z, and w.
- Note
Invoking glVertex outside of a glBegin/glEnd pair results in undefined behavior.
- See also
glBegin, glCallList, glColor, glEdgeFlag, glEvalCoord, glFogCoord, glIndex, glMaterial, glMultiTexCoord, glNormal, glRect, glTexCoord, glVertexPointer