Previous: glGenSamplers Table of Contents (GL) Next: glGenTransformFeedbacks

glGenTextures

generate texture names

Signature

glGenTextures( GLsizei ( n ) , GLuint * ( textures ) )-> void
glGenTextures( n , textures )
Generate count new texture names

    Note: for compatibility with PyOpenGL 2.x and below,
    a count of 1 will return a single integer, rather than
    an array of integers.
    

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

See Also

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 tests/shadow_2.py Lines: 72
OpenGLContext tests/shadow_1.py Lines: 513
OpenGLContext tests/nehe8.py Lines: 130, 138, 146
OpenGLContext tests/nehe6.py Lines: 49
OpenGLContext tests/nehe6_convolve.py Lines: 99
OpenGLContext tests/dek_texturesurf.py Lines: 105
OpenGLContext tests/nehe7.py Lines: 96, 104, 112
OpenGLContext OpenGLContext/texture.py Lines: 59
OpenGLContext OpenGLContext/scenegraph/shaders.py Lines: 237
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 207
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 70
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 30
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 143
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 71
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 36
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 68
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 33
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 67
{LGPL} PyUI pyui/renderers/openglPygame.py Lines: 150, 273
{LGPL} PyUI pyui/renderers/openglGlut.py Lines: 206
{LGPL} PyUI2 system/openglgraphics.py Lines: 222, 328
{LGPL} PyUI2 renderers/openglPygame.py Lines: 153, 276
{LGPL} PyUI2 renderers/openglGlut.py Lines: 206
{LGPL} VisionEgg VisionEgg/SphereMap.py Lines: 648, 945
{LGPL} VisionEgg VisionEgg/Textures.py Lines: 430
{LGPL} VisionEgg VisionEgg/Gratings.py Lines: 251, 555
{LGPL} PyMT pymt/texture.py Lines: 18, 237
{GPL} GLChess src/lib/scene/opengl/texture.py Lines: 112
{GPL} GLChess src/lib/scene/opengl/opengl.py Lines: 666
{LGPL} Pyggel pyggel/data.py Lines: 65
{LGPL} pygl2d pygl2d/image.py Lines: 48
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 689
{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 Code/Python/Kamaelia/Kamaelia/UI/OpenGL/Button.py Lines: 253
{LGPL or GPL or MPL} Kamaelia Sketches/MH/OpenGL/3dFolding.py Lines: 166
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Utils/Particles3D.py Lines: 114
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 81
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 125
{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/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/Kamaelia/UI/OpenGL/Button.py Lines: 264
{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/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/CL/Topology3D/THF/Sketches/playground/Button.py Lines: 167
{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/TexPlane.py Lines: 93
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Display3D.py Lines: 287
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Button.py Lines: 167
Visvis core/line.py Lines: 63
Visvis core/baseTexture.py Lines: 347
Previous: glGenSamplers Table of Contents (GL) Next: glGenTransformFeedbacks