glGenTextures

generate texture names

Signature

glGenTextures( GLsizei ( n ) , GLuint * ( textures ) )-> void
glGenTextures( n , textures )

Parameters

VariablesDescription
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 .
The generated textures have no dimensionality; they assume the dimensionality of the texture target to which they are first bound (see glBindTexture ).
Texture names returned by a call to glGenTextures are not returned by subsequent calls, unless they are first deleted with glDeleteTextures .

Errors

GL_INVALID_VALUE is generated if n is negative.

Associated Gets

Version Support

glGenTextures

See Also

Copyright

Copyright
1991-2006 Silicon Graphics, Inc. Copyright
2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see .

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glGenTextures
OpenGLContext OpenGLContext/texture.py Lines: 61
OpenGLContext OpenGLContext/scenegraph/shaders.py Lines: 244
OpenGLContext tests/shadow_1.py Lines: 514
OpenGLContext tests/dek_texturesurf.py Lines: 105
OpenGLContext tests/nehe6_compressed.py Lines: 31
OpenGLContext tests/nehe8.py Lines: 130, 138, 146
OpenGLContext tests/shadow_2.py Lines: 73
OpenGLContext tests/nehe6_convolve.py Lines: 100
OpenGLContext tests/nehe7.py Lines: 97, 105, 113
OpenGLContext tests/nehe6.py Lines: 49
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 72
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 145
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 35
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 38
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 32
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 74
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 191
{LGPL} PyUI2 renderers/openglGlut.py Lines: 206
{LGPL} PyUI2 renderers/openglPygame.py Lines: 153, 276
{LGPL} PyUI2 system/openglgraphics.py Lines: 222, 328
{LGPL} VisionEgg VisionEgg/SphereMap.py Lines: 648, 945
{LGPL} VisionEgg VisionEgg/Gratings.py Lines: 251, 570
{LGPL} VisionEgg VisionEgg/Textures.py Lines: 481
{LGPL} PyMT pymt/texture.py Lines: 18, 237
{LGPL} Pyggel pyggel/data.py Lines: 65
{LGPL} pygl2d pygl2d/image.py Lines: 67
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 707
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/Button.py Lines: 253
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/TexPlane.py Lines: 133
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/Label.py Lines: 201
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Utils/Particles3D.py Lines: 150
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 144
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 100
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 690
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/Button.py Lines: 264
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/TexPlane.py Lines: 133
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/Label.py Lines: 201
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Button3D.py Lines: 131
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/TexPlane.py Lines: 230
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 270
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Button.py Lines: 167
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/TexPlane.py Lines: 93
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Display3D.py Lines: 287
{LGPL or GPL or MPL} Kamaelia Sketches/MH/OpenGL/3dFolding.py Lines: 185
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Button3D.py Lines: 131
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/TexPlane.py Lines: 230
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 270
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Button.py Lines: 167
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/TexPlane.py Lines: 93
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Display3D.py Lines: 287
Visvis core/line.py Lines: 63
Visvis core/baseTexture.py Lines: 353
{GPL3} OpenGL-Programmable 05-shader.py Lines: 103
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 120
{GPL3} OpenGL-Programmable 03-array.py Lines: 35
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 138
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 111
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 146
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 35
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 36
{GPL3} OpenGL-Programmable 01-direct.py Lines: 35
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 120