Previous: OpenGL.GL.glget OpenGL. GL. images Next: OpenGL.GL.pointers

OpenGL. GL. images

Image-handling routines
### Unresolved:
Following methods are not yet resolved due to my not being sure how the function should be wrapped:
glCompressedTexImage3D glCompressedTexImage2D glCompressedTexImage1D glCompressedTexSubImage3D glCompressedTexSubImage2D glCompressedTexSubImage1D

Functions

glGetTexImage( target , level , format , type , outputType = <type 'str'> )
Get a texture-level as an image
target
enum constant for the texture engine to be read
level
the mip-map level to read
format
image format to read out the data
type
data-type into which to read the data
outputType
default (str) provides string output of the results iff OpenGL.UNSIGNED_BYTE_IMAGES_AS_STRING is True and type == GL_UNSIGNED_BYTE. Any other value will cause output in the default array output format.
returns the pixel data array in the format defined by the format, type and outputType
glGetTexImagef( target , level , format , type = GL_FLOAT )
Get a texture-level as an image
glGetTexImagei( target , level , format , type = GL_INT )
Get a texture-level as an image
glGetTexImages( target , level , format , type = GL_SHORT )
Get a texture-level as an image
glGetTexImageui( target , level , format , type = GL_UNSIGNED_INT )
Get a texture-level as an image
glGetTexImageus( target , level , format , type = GL_UNSIGNED_SHORT )
Get a texture-level as an image
glReadPixels( x , y , width , height , format , type , array = None , outputType = <type 'str'> )
Read specified pixels from the current display buffer
x,y,width,height -- location and dimensions of the image to read from the buffer format -- pixel format for the resulting data type -- data-format for the resulting data array -- optional array/offset into which to store the value outputType -- default (str) provides string output of the results iff OpenGL.UNSIGNED_BYTE_IMAGES_AS_STRING is True and type == GL_UNSIGNED_BYTE. Any other value will cause output in the default array output format.
returns the pixel data array in the format defined by the format, type and outputType
glReadPixelsf( x , y , width , height , format , type = GL_FLOAT , array = None )
Read specified pixels from the current display buffer
This typed version returns data in your specified default array data-type format, or in the passed array, which will be converted to the array-type required by the format.
glReadPixelsi( x , y , width , height , format , type = GL_INT , array = None )
Read specified pixels from the current display buffer
This typed version returns data in your specified default array data-type format, or in the passed array, which will be converted to the array-type required by the format.
glReadPixelss( x , y , width , height , format , type = GL_SHORT , array = None )
Read specified pixels from the current display buffer
This typed version returns data in your specified default array data-type format, or in the passed array, which will be converted to the array-type required by the format.
glReadPixelsui( x , y , width , height , format , type = GL_UNSIGNED_INT , array = None )
Read specified pixels from the current display buffer
This typed version returns data in your specified default array data-type format, or in the passed array, which will be converted to the array-type required by the format.
glReadPixelsus( x , y , width , height , format , type = GL_UNSIGNED_SHORT , array = None )
Read specified pixels from the current display buffer
This typed version returns data in your specified default array data-type format, or in the passed array, which will be converted to the array-type required by the format.

Classes

Previous: OpenGL.GL.glget OpenGL. GL. images Next: OpenGL.GL.pointers