OpenGL.GL.glget
index
/home/mcfletch/pylive/OpenGL/GL/glget.py

Implementation of the special "glGet" functions
 
For comparison, here's what a straightforward implementation looks like:
 
    def glGetDoublev( pname ):
        "Natural writing of glGetDoublev using standard ctypes"
        output = c_double*sizes.get( pname )
        result = output()
        result = platform.OpenGL.glGetDoublev( pname, byref(result) )
        return Numeric.array( result )

 
Modules
       
OpenGL.arrays
OpenGL.converters
ctypes
OpenGL.error
OpenGL.platform
OpenGL.raw.GL
OpenGL.wrapper

 
Functions
       
GL_GET_PIXEL_MAP_SIZE(pname)
Given a pname, lookup the size using a glGet query...
addGLGetConstant(constant, arraySize)
Add a glGet* constant to return an output array of correct size

 
Data
        GL_GET_LIGHT_SIZES = {GL_AMBIENT: (4,), GL_DIFFUSE: (4,), GL_SPECULAR: (4,), GL_POSITION: (4,), GL_SPOT_DIRECTION: (3,), GL_SPOT_EXPONENT: (1,), GL_SPOT_CUTOFF: (1,), GL_CONSTANT_ATTENUATION: (1,), GL_LINEAR_ATTENUATION: (1,), GL_QUADRATIC_ATTENUATION: (1,)}
GL_GET_MATERIAL_SIZES = {GL_AMBIENT: (4,), GL_DIFFUSE: (4,), GL_SPECULAR: (4,), GL_EMISSION: (4,), GL_SHININESS: (1,), GL_COLOR_INDEXES: (3,)}
GL_GET_SIZES = {GL_CURRENT_COLOR: (4,), GL_CURRENT_INDEX: (1,), GL_CURRENT_NORMAL: (3,), GL_CURRENT_TEXTURE_COORDS: (4,), GL_CURRENT_RASTER_COLOR: (4,), GL_CURRENT_RASTER_INDEX: (1,), GL_CURRENT_RASTER_TEXTURE_COORDS: (4,), GL_CURRENT_RASTER_POSITION: (4,), GL_CURRENT_RASTER_POSITION_VALID: (1,), GL_CURRENT_RASTER_DISTANCE: (1,), ...}
GL_GET_TEX_ENV_SIZES = {GL_TEXTURE_ENV_MODE: (1,), GL_TEXTURE_ENV_COLOR: (4,)}
GL_GET_TEX_GEN_SIZES = {GL_TEXTURE_GEN_MODE: (1,), GL_OBJECT_PLANE: (4,), GL_EYE_PLANE: (4,)}
PIXEL_MAP_SIZE_CONSTANT_MAP = {GL_PIXEL_MAP_I_TO_I: GL_PIXEL_MAP_I_TO_I_SIZE, GL_PIXEL_MAP_S_TO_S: GL_PIXEL_MAP_S_TO_S_SIZE, GL_PIXEL_MAP_I_TO_R: GL_PIXEL_MAP_I_TO_R_SIZE, GL_PIXEL_MAP_I_TO_G: GL_PIXEL_MAP_I_TO_G_SIZE, GL_PIXEL_MAP_I_TO_B: GL_PIXEL_MAP_I_TO_B_SIZE, GL_PIXEL_MAP_I_TO_A: GL_PIXEL_MAP_I_TO_A_SIZE, GL_PIXEL_MAP_R_TO_R: GL_PIXEL_MAP_R_TO_R_SIZE, GL_PIXEL_MAP_G_TO_G: GL_PIXEL_MAP_G_TO_G_SIZE, GL_PIXEL_MAP_B_TO_B: GL_PIXEL_MAP_B_TO_B_SIZE, GL_PIXEL_MAP_A_TO_A: GL_PIXEL_MAP_A_TO_A_SIZE}
POLYGON_STIPPLE_SIZE = (128,)
TEX_PARAMETER_SIZES = {GL_TEXTURE_BORDER_COLOR: (4,), GL_TEXTURE_MAG_FILTER: (1,), GL_TEXTURE_MIN_FILTER: (1,), GL_TEXTURE_WRAP_S: (1,), GL_TEXTURE_WRAP_T: (1,), GL_TEXTURE_PRIORITY: (1,), GL_TEXTURE_RESIDENT: (1,), GL_TEXTURE_WRAP_R: (1,), GL_TEXTURE_MIN_LOD: (1,), GL_TEXTURE_MAX_LOD: (1,), ...}
__all__ = ('glGetBoolean', 'glGetBooleanv', 'glGetInteger', 'glGetIntegerv', 'glGetFloat', 'glGetFloatv', 'glGetDouble', 'glGetDoublev', 'glGetString', 'glGetLightfv', 'glGetLightiv', 'glGetMaterialfv', 'glGetMaterialiv', 'glGetPixelMapfv', 'glGetPixelMapusv', 'glGetPixelMapuiv', 'glGetPolygonStipple', 'glGetPolygonStippleub', 'glGetTexEnviv', 'glGetTexEnvfv', ...)
__file__ = '/home/mcfletch/pylive/OpenGL/GL/glget.pyc'
__name__ = 'OpenGL.GL.glget'
__package__ = 'OpenGL.GL'
glGetBoolean = <OpenGL.wrapper.glGetIntegerv object at 0x26aa4d0>
glGetBooleanv = <OpenGL.wrapper.glGetIntegerv object at 0x26aa4d0>
glGetDouble = <OpenGL.wrapper.glGetDoublev object at 0x26aa050>
glGetDoublev = <OpenGL.wrapper.glGetDoublev object at 0x26aa050>
glGetFloat = <OpenGL.wrapper.glGetFloatv object at 0x26aa290>
glGetFloatv = <OpenGL.wrapper.glGetFloatv object at 0x26aa290>
glGetInteger = <OpenGL.wrapper.glGetIntegerv object at 0x26aa4d0>
glGetIntegerv = <OpenGL.wrapper.glGetIntegerv object at 0x26aa4d0>
glGetLightfv = <OpenGL.wrapper.glGetLightfv object at 0x26aa6c8>
glGetLightiv = <OpenGL.wrapper.glGetLightiv object at 0x26aa8c0>
glGetMaterialfv = <OpenGL.wrapper.glGetMaterialfv object at 0x26aaab8>
glGetMaterialiv = <OpenGL.wrapper.glGetMaterialiv object at 0x26aacb0>
glGetPixelMapfv = <OpenGL.wrapper.glGetPixelMapfv object at 0x26aaef0>
glGetPixelMapuiv = <OpenGL.wrapper.glGetPixelMapuiv object at 0x26ab128>
glGetPixelMapusv = <OpenGL.wrapper.glGetPixelMapusv object at 0x26ab320>
glGetPolygonStipple = <OpenGL.wrapper.glGetPolygonStipple object at 0x26ab4d0>
glGetPolygonStippleub = <OpenGL.wrapper.glGetPolygonStipple object at 0x26ab4d0>
glGetString = <_FuncPtr object at 0x25902c0>
glGetTexEnvfv = <OpenGL.wrapper.glGetTexEnvfv object at 0x26ab680>
glGetTexEnviv = <OpenGL.wrapper.glGetTexEnviv object at 0x26ab878>
glGetTexGendv = <OpenGL.wrapper.glGetTexGendv object at 0x26aba70>
glGetTexGenfv = <OpenGL.wrapper.glGetTexGenfv object at 0x26abc68>
glGetTexGeniv = <OpenGL.wrapper.glGetTexGeniv object at 0x26abe60>
glGetTexLevelParameterfv = <OpenGL.wrapper.glGetTexLevelParameterfv object at 0x26ae098>
glGetTexLevelParameteriv = <OpenGL.wrapper.glGetTexLevelParameteriv object at 0x26ae248>
glGetTexParameterfv = <OpenGL.wrapper.glGetTexParameterfv object at 0x26ae3f8>
glGetTexParameteriv = <OpenGL.wrapper.glGetTexParameteriv object at 0x26ae5f0>