NAME

glNewList, glEndList - create or replace a display list

C SPECIFICATION

void ggllNNeewwLLiisstt( GLuint _l_i_s_t,
                GLenum _m_o_d_e )

PARAMETERS

_l_i_s_t
Specifies the display-list name.
_m_o_d_e
Specifies the compilation mode, which can be GGLL__CCOOMMPPIILLEE or GGLL__CCOOMMPPIILLEE__AANNDD__EEXXEECCUUTTEE.

C SPECIFICATION

void ggllEEnnddLLiisstt( void )

                

DESCRIPTION

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

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

GGLL__CCOOMMPPIILLEE
Commands are merely compiled.
GGLL__CCOOMMPPIILLEE__AANNDD__EEXXEECCUUTTEE
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 ggllAArreeTTeexxttuurreessRReessiiddeenntt, ggllCCoolloorrPPooiinntteerr, ggllDDeelleetteeLLiissttss, ggllDDeelleetteeTTeexxttuurreess, ggllDDiissaabblleeCClliieennttSSttaattee, ggllEEddggeeFFllaaggPPooiinntteerr, ggllEEnnaabblleeCClliieennttSSttaattee, ggllFFeeeeddbbaacckkBBuuffffeerr, ggllFFiinniisshh, ggllFFlluusshh, ggllGGeennLLiissttss, ggllGGeennTTeexxttuurreess, ggllIInnddeexxPPooiinntteerr, ggllIInntteerrlleeaavveeddAArrrraayyss, ggllIIssEEnnaabblleedd, ggllIIssLLiisstt, ggllIIssTTeexxttuurree, ggllNNoorrmmaallPPooiinntteerr, ggllPPooppCClliieennttAAttttrriibb, ggllPPiixxeellSSttoorree, ggllPPuusshhCClliieennttAAttttrriibb, ggllRReeaaddPPiixxeellss, ggllRReennddeerrMMooddee, ggllSSeelleeccttBBuuffffeerr, ggllTTeexxCCoooorrddPPooiinntteerr, ggllVVeerrtteexxPPooiinntteerr, and all of the ggllGGeett commands.

Similarly, ggllTTeexxIImmaaggee11DD, ggllTTeexxIImmaaggee22DD, and ggllTTeexxIImmaaggee33DD are executed immediately and not compiled into the display list when their first argument is GGLL__PPRROOXXYY__TTEEXXTTUURREE__11DD, GGLL__PPRROOXXYY__TTEEXXTTUURREE__11DD, or GGLL__PPRROOXXYY__TTEEXXTTUURREE__33DD, respectively.

When the GGLL__AARRBB__iimmaaggiinngg extension is supported, ggllHHiissttooggrraamm executes immediately when its argument is GGLL__PPRROOXXYY__HHIISSTTOOGGRRAAMM. Similarly, ggllCCoolloorrTTaabbllee executes immediately when its first argument is ggllPPRROOXXYY__CCOOLLOORR__TTAABBLLEE, ggllPPRROOXXYY__PPOOSSTT__CCOONNVVOOLLUUTTIIOONN__CCOOLLOORR__TTAABBLLEE, or ggllPPRROOXXYY__PPOOSSTT__CCOOLLOORR__MMAATTRRIIXX__CCOOLLOORR__TTAABBLLEE.

When the GGLL__AARRBB__mmuullttiitteexxttuurree extension is supported, ggllCClliieennttAAccttiivveeTTeexxttuurreeAARRBB is not compiled into display lists, but executed immediately.

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

NOTES

ggllCCaallllLLiisstt and ggllCCaallllLLiissttss can be entered into display lists. Commands in the display list or lists executed by ggllCCaallllLLiisstt or ggllCCaallllLLiissttss are not included in the display list being created, even if the list creation mode is GGLL__CCOOMMPPIILLEE__AANNDD__EEXXEECCUUTTEE.

A display list is just a group of commands and arguments, so errors generated by commands in a display list must be generated when the list is executed. If the list is created in GGLL__CCOOMMPPIILLEE mode, errors are not generated until the list is executed.

ERRORS

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _l_i_s_t is 0.

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _m_o_d_e is not an accepted value.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllEEnnddLLiisstt is called without a preceding ggllNNeewwLLiisstt, or if ggllNNeewwLLiisstt is called while a display list is being defined.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllNNeewwLLiisstt or ggllEEnnddLLiisstt is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

GGLL__OOUUTT__OOFF__MMEEMMOORRYY is generated if there is insufficient memory to compile the display list. If the GL version is 1.1 or greater, no change is made to the previous contents of the display list, if any, and no other change is made to the GL state. (It is as if no attempt had been made to create the new display list.)

ASSOCIATED GETS

ggllIIssLLiisstt
ggllGGeett with argument GGLL__LLIISSTT__IINNDDEEXX
ggllGGeett with argument GGLL__LLIISSTT__MMOODDEE

SEE ALSO

ggllCCaallllLLiisstt((33GG)), ggllCCaallllLLiissttss((33GG)), ggllDDeelleetteeLLiissttss((33GG)), ggllGGeennLLiissttss((33GG))