Light | Dark

# docs.GL

OpenGL 3
OpenGL 2

# glGenLists

## Name

glGenLists — generate a contiguous set of empty display lists

## C Specification

`GLuint glGenLists(` | GLsizei | range`)`;

## Parameters

`range`

  Specifies the number of contiguous empty display lists to be generated.

## Description

`glGenLists` has one argument, `range`. It returns an integer n such that `range` contiguous empty display lists, named n, n + 1 , ... , n + range - 1 , are created. If `range` is 0, if there is no group of `range` contiguous names available, or if any error is generated, no display lists are generated, and 0 is returned.

## Errors

`GL_INVALID_VALUE` is generated if `range` is negative.

`GL_INVALID_OPERATION` is generated if `glGenLists` is executed between the execution of glBegin and the corresponding execution of glEnd.

## Associated Gets

glIsList

## Tutorials

## See Also

glCallList, glCallLists, glDeleteLists, glNewList

## Copyright

Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/.

Think you can improve this page? Edit this page on GitHub.