Light | Dark

glGenTextures

Name

glGenTextures — generate texture names

C Specification

void glGenTextures( GLsizei n,
  GLuint * textures);
 

Parameters

n

Specifies the number of texture names to be generated.

textures

Specifies an array in which the generated texture names are stored.

Description

glGenTextures returns n texture names in textures. 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 glGenTextures.

Texture names returned by a call to glGenTextures are not returned by subsequent calls, unless they are first deleted with glDeleteTextures.

The names returned in textures are marked as used, for the purposes of glGenTextures only, but they acquire state and dimensionality only when they are first bound using glBindTexture.

Errors

GL_INVALID_VALUE is generated if n is negative.

Associated Gets

glIsTexture

API Version Support

OpenGL ES API Version
Function Name 2.0 3.0 3.1 3.2
glGenTextures
Think you can improve this page? Edit this page on GitHub.