File: window_pos.py

package info (click to toggle)
pyopengl 3.0.0~b6-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,696 kB
  • ctags: 26,182
  • sloc: python: 34,233; ansic: 70; sh: 26; makefile: 15
file content (181 lines) | stat: -rw-r--r-- 5,862 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
'''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 )