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

glEndList

发布时间:2023-09-14 19:44:58

glEndList是一个函数。

glEndList介绍

glEndList是一个函数。

glEndList

glEndList

NAME

glNewList, glEndList -- create or replace a display list

C SPECIFICATION

void glNewList(GLuint list,

GLenum mode)

PARAMETERS

list

Specifies the display list name.

mode

Specifies the compilation mode, which can be GL_COMPILE or GL_COMPILE_AND_EXECUTE.

C SPECIFICATION

glEndList

void glEndList(void void)

DEscriptION

Display lists are groups of GL commands that have been stored for subsequent execution. The display lists are created with glNewList. All subsequent commands are placed in the display list, in the order issued, until glEndList is called.

glNewList has two arguments. The first argument, list, is a positive integer that becomes the unique name for the display list. Names can be created and reserved with glGenLists and tested for uniqueness with glIsList. The second argument, mode, is a symbolic constant that can assume one of two values:

GL_COMPILE

Commands are merely compiled.

GL_COMPILE_AND_EXECUTE

Commands are executed as they are compiled into the display list.

Certain commands are not compiled into the display list, but are executed immediately, regardless of the display-list mode. These commands are glIsList, glGenLists, glDeleteList, glFeedbackBuffer, glSelectBuffer, glRenderMode, glReadPixels, glPixelStore, glFlush, glFinish, glIsEnabled, and all of the glGet routines.

When glEndList is encountered, the display-list definition is completed by associating the list with the unique name list (specified in the glNewList command). If a display list with name list already exists, it is replaced only when glEndList is called.

NOTES

glCallList and glCallLists can be entered into display lists. The commands in the display list or lists executed by glCallList or glCallLists are not included in the display list being created, even if the list creation mode is GL_COMPILE_AND_EXECUTE.

ERRORS

glEndList

GL_INVALID_VALUE is generated if list is zero.

GL_INVALID_ENUM is generated if mode is not an accepted value.

GL_INVALID_OPERATION is generated if glEndList is called without a preceding glNewList, or if glNewList is called while a display list is being defined.

GL_INVALID_OPERATION is generated if glNewList is called between a call to glBegin and the corresponding call to glEnd.

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