当前位置:首页 科普知识 glVertex

glVertex

发布时间:2023-09-06 15:48:04

glVertex是一个计算机系统函数。

glVertex详细介绍

glVertex是一个计算机系统函数。

glVertex

glVertexNAME

C SPECIFICATION

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,

glVertex

GLfloat z,

GLfloat w)

void glVertex4i(GLint x,

GLint y,

GLint z,

GLint w)

void glVertex4s(GLshort x,

GLshort y,

GLshort z,

GLshort w)

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.

C SPECIFICATION

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)

glVertexPARAMETERS

v

Specifies a pointer to 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.

glVertex

glVertexDEscriptION

glVertex commands are used within glBegin / glEnd 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.

glVertexNOTES

Invoking glVertex outside of a glBegin / glEnd pair results in behavior.

注:glVertex<234><sifd>v(const type *v)中的元素应该是二维数组保存的点坐标,例如:a,a,a,分别表示2、3、4维点。

温馨提示:
本文【glVertex】由作者 爱百科 转载提供。 该文观点仅代表作者本人, 自学教育网 信息发布平台,仅提供信息存储空间服务, 若存在侵权问题,请及时联系管理员或作者进行删除。
(c)2008-2025 自学教育网 All Rights Reserved 汕头市灵创科技有限公司
粤ICP备2024240640号-6