home *** CD-ROM | disk | FTP | other *** search
- '''OpenGL extension ARB.window_pos
-
- Overview (from the spec)
-
- In order to set the current raster position to a specific window
- coordinate with the RasterPos command, the modelview matrix, projection
- matrix and viewport must be set very carefully. Furthermore, if the
- desired window coordinate is outside of the window's bounds one must rely
- on a subtle side-effect of the Bitmap command in order to avoid frustum
- clipping.
-
- This extension provides a set of functions to directly set the current
- raster position in window coordinates, bypassing the modelview matrix, the
- projection matrix and the viewport-to-window mapping. Furthermore, clip
- testing is not performed, so that the current raster position is always
- valid.
-
- This greatly simplifies the process of setting the current raster position
- to a specific window coordinate prior to calling DrawPixels, CopyPixels or
- Bitmap. Many matrix operations can be avoided when mixing 2D and 3D
- rendering.
-
- The official definition of this extension is available here:
- http://oss.sgi.com/projects/ogl-sample/registry/ARB/window_pos.txt
-
- Automatically generated by the get_gl_extensions script, do not edit!
- '''
- from OpenGL import platform, constants, constant, arrays
- from OpenGL import extensions
- from OpenGL.GL import glget
- import ctypes
- EXTENSION_NAME = 'GL_ARB_window_pos'
-
- glWindowPos2dARB = platform.createExtensionFunction(
- 'glWindowPos2dARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLdouble, constants.GLdouble,),
- doc = 'glWindowPos2dARB( GLdouble(x), GLdouble(y) ) -> None',
- argNames = ('x', 'y',),
- )
-
- glWindowPos2dvARB = platform.createExtensionFunction(
- 'glWindowPos2dvARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLdoubleArray,),
- doc = 'glWindowPos2dvARB( GLdoubleArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos2fARB = platform.createExtensionFunction(
- 'glWindowPos2fARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLfloat, constants.GLfloat,),
- doc = 'glWindowPos2fARB( GLfloat(x), GLfloat(y) ) -> None',
- argNames = ('x', 'y',),
- )
-
- glWindowPos2fvARB = platform.createExtensionFunction(
- 'glWindowPos2fvARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLfloatArray,),
- doc = 'glWindowPos2fvARB( GLfloatArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos2iARB = platform.createExtensionFunction(
- 'glWindowPos2iARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLint, constants.GLint,),
- doc = 'glWindowPos2iARB( GLint(x), GLint(y) ) -> None',
- argNames = ('x', 'y',),
- )
-
- glWindowPos2ivARB = platform.createExtensionFunction(
- 'glWindowPos2ivARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLintArray,),
- doc = 'glWindowPos2ivARB( GLintArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos2sARB = platform.createExtensionFunction(
- 'glWindowPos2sARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLshort, constants.GLshort,),
- doc = 'glWindowPos2sARB( GLshort(x), GLshort(y) ) -> None',
- argNames = ('x', 'y',),
- )
-
- glWindowPos2svARB = platform.createExtensionFunction(
- 'glWindowPos2svARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLshortArray,),
- doc = 'glWindowPos2svARB( GLshortArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos3dARB = platform.createExtensionFunction(
- 'glWindowPos3dARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLdouble, constants.GLdouble, constants.GLdouble,),
- doc = 'glWindowPos3dARB( GLdouble(x), GLdouble(y), GLdouble(z) ) -> None',
- argNames = ('x', 'y', 'z',),
- )
-
- glWindowPos3dvARB = platform.createExtensionFunction(
- 'glWindowPos3dvARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLdoubleArray,),
- doc = 'glWindowPos3dvARB( GLdoubleArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos3fARB = platform.createExtensionFunction(
- 'glWindowPos3fARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLfloat, constants.GLfloat, constants.GLfloat,),
- doc = 'glWindowPos3fARB( GLfloat(x), GLfloat(y), GLfloat(z) ) -> None',
- argNames = ('x', 'y', 'z',),
- )
-
- glWindowPos3fvARB = platform.createExtensionFunction(
- 'glWindowPos3fvARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLfloatArray,),
- doc = 'glWindowPos3fvARB( GLfloatArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos3iARB = platform.createExtensionFunction(
- 'glWindowPos3iARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLint, constants.GLint, constants.GLint,),
- doc = 'glWindowPos3iARB( GLint(x), GLint(y), GLint(z) ) -> None',
- argNames = ('x', 'y', 'z',),
- )
-
- glWindowPos3ivARB = platform.createExtensionFunction(
- 'glWindowPos3ivARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLintArray,),
- doc = 'glWindowPos3ivARB( GLintArray(v) ) -> None',
- argNames = ('v',),
- )
-
- glWindowPos3sARB = platform.createExtensionFunction(
- 'glWindowPos3sARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(constants.GLshort, constants.GLshort, constants.GLshort,),
- doc = 'glWindowPos3sARB( GLshort(x), GLshort(y), GLshort(z) ) -> None',
- argNames = ('x', 'y', 'z',),
- )
-
- glWindowPos3svARB = platform.createExtensionFunction(
- 'glWindowPos3svARB', dll=platform.GL,
- extension=EXTENSION_NAME,
- resultType=None,
- argTypes=(arrays.GLshortArray,),
- doc = 'glWindowPos3svARB( GLshortArray(v) ) -> None',
- argNames = ('v',),
- )
-
-
- def glInitWindowPosARB():
- '''Return boolean indicating whether this extension is available'''
- return extensions.hasGLExtension( EXTENSION_NAME )
-