Name
gl.GenTextures -- generate texture names
Synopsis
texturesArray = gl.GenTextures(n)
Function
gl.GenTextures() generates n texture names and returns them in the table texturesArray. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none of the returned names was in use immediately before the call to gl.GenTextures().

The generated textures have no dimensionality; they assume the dimensionality of the texture target to which they are first bound (See gl.BindTexture for details.).

Texture names returned by a call to gl.GenTextures() are not returned by subsequent calls, unless they are first deleted with gl.DeleteTextures().

Please consult an OpenGL reference manual for more information.

Inputs
n
specifies the number of texture names to be generated
Results
texturesArray
table containing n number of texture names
Errors
#GL_INVALID_VALUE is generated if n is negative.

#GL_INVALID_OPERATION is generated if gl.GenTextures() is executed between the execution of gl.Begin() and the corresponding execution of gl.End() .

Associated gets
gl.IsTexture()


Show TOC