~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to doc/python_api/alternative/epy/bgl.py

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# bgl module (OpenGL wrapper)
 
2
 
 
3
"""
 
4
B{New}: some GLU functions: L{gluLookAt}, etc.
 
5
 
 
6
This module wraps OpenGL constants and functions, making them available from
 
7
within Blender Python.
 
8
 
 
9
The complete list can be retrieved from the module itself, by listing its
 
10
contents: dir(bgl).  A simple search on the net can point to more 
 
11
than enough material to teach OpenGL programming, from books to many 
 
12
collections of tutorials.
 
13
 
 
14
The "red book": "I{OpenGL Programming Guide: The Official Guide to Learning
 
15
OpenGL}" and the online NeHe tutorials are two of the best resources.
 
16
 
 
17
@note: you can use the L{Image} module and L{Image.Image} BPy object to load
 
18
    and set textures.  See L{Image.Image.glLoad} and L{Image.Image.glFree},
 
19
    for example.
 
20
@see: U{www.opengl.org}
 
21
@see: U{nehe.gamedev.net}
 
22
"""
 
23
 
 
24
def glAccum(op, value):
 
25
  """
 
26
  Operate on the accumulation buffer
 
27
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/accum.html}
 
28
 
 
29
  @type op: Enumerated constant
 
30
  @param op: The accumulation buffer operation. 
 
31
  @type value: float
 
32
  @param value: a value used in the accumulation buffer operation.
 
33
  """
 
34
 
 
35
def glAlphaFunc(func, ref):
 
36
  """
 
37
  Specify the alpha test function
 
38
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/alphafunc.html}
 
39
  
 
40
  @type func: Enumerated constant
 
41
  @param func: Specifies the alpha comparison function. 
 
42
  @type ref: float
 
43
  @param ref: The reference value that incoming alpha values are compared to. 
 
44
  Clamped between 0 and 1.
 
45
  """
 
46
 
 
47
def glAreTexturesResident(n, textures, residences):
 
48
  """
 
49
  Determine if textures are loaded in texture memory
 
50
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/aretexturesresident.html}
 
51
 
 
52
  @type n: int
 
53
  @param n: Specifies the number of textures to be queried.
 
54
  @type textures: Buffer object I{type GL_INT}
 
55
  @param textures: Specifies an array containing the names of the textures to be queried 
 
56
  @type residences: Buffer object I{type GL_INT} (boolean)
 
57
  @param residences: An array in which the texture residence status in returned.The residence status of a
 
58
  texture named by an element of textures is returned in the corresponding element of residences.
 
59
  """
 
60
 
 
61
def glBegin(mode):
 
62
  """
 
63
  Delimit the vertices of a primitive or a group of like primatives
 
64
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html}
 
65
 
 
66
  @type mode: Enumerated constant
 
67
  @param mode: Specifies the primitive that will be create from vertices between glBegin and
 
68
  glEnd. 
 
69
  """
 
70
 
 
71
def glBindTexture(target, texture):
 
72
  """
 
73
  Bind a named texture to a texturing target
 
74
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bindtexture.html}
 
75
 
 
76
  @type target: Enumerated constant
 
77
  @param target: Specifies the target to which the texture is bound. 
 
78
  @type texture: unsigned int
 
79
  @param texture: Specifies the name of a texture.
 
80
  """
 
81
 
 
82
def glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap):
 
83
  """
 
84
  Draw a bitmap
 
85
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bitmap.html}
 
86
 
 
87
  @type width, height: int
 
88
  @param width, height: Specify the pixel width and height of the bitmap image.
 
89
  @type xorig, yorig: float
 
90
  @param xorig, yorig: Specify the location of the origin in the bitmap image. The origin is measured
 
91
  from the lower left corner of the bitmap, with right and up being the positive axes.
 
92
  @type xmove, ymove: float
 
93
  @param xmove, ymove: Specify the x and y offsets to be added to the current raster position after 
 
94
  the bitmap is drawn. 
 
95
  @type bitmap: Buffer object I{type GL_BYTE}
 
96
  @param bitmap: Specifies the address of the bitmap image. 
 
97
  """
 
98
 
 
99
def glBlendFunc(sfactor, dfactor):
 
100
  """
 
101
  Specify pixel arithmetic
 
102
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/blendfunc.html}
 
103
 
 
104
  @type sfactor: Enumerated constant
 
105
  @param sfactor: Specifies how the red, green, blue, and alpha source blending factors are 
 
106
  computed. 
 
107
  @type dfactor: Enumerated constant
 
108
  @param dfactor: Specifies how the red, green, blue, and alpha destination blending factors are 
 
109
  computed. 
 
110
  """
 
111
 
 
112
def glCallList(list):
 
113
  """
 
114
  Execute a display list
 
115
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllist.html}
 
116
 
 
117
  @type list: unsigned int
 
118
  @param list: Specifies the integer name of the display list to be executed.
 
119
  """
 
120
 
 
121
def glCallLists(n, type, lists):
 
122
  """
 
123
  Execute a list of display lists
 
124
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllists.html}
 
125
 
 
126
  @type n: int
 
127
  @param n: Specifies the number of display lists to be executed. 
 
128
  @type type: Enumerated constant
 
129
  @param type: Specifies the type of values in lists. 
 
130
  @type lists: Buffer object
 
131
  @param lists: Specifies the address of an array of name offsets in the display list. 
 
132
  The pointer type is void because the offsets can be bytes, shorts, ints, or floats, 
 
133
  depending on the value of type.
 
134
  """
 
135
 
 
136
def glClear(mask):
 
137
  """
 
138
  Clear buffers to preset values
 
139
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clear.html}
 
140
 
 
141
  @type mask: Enumerated constant(s)
 
142
  @param mask: Bitwise OR of masks that indicate the buffers to be cleared. 
 
143
  """
 
144
 
 
145
def glClearAccum(red, green, blue, alpha):
 
146
  """
 
147
  Specify clear values for the accumulation buffer
 
148
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearaccum.html}
 
149
 
 
150
  @type red, green, blue, alpha: float
 
151
  @param red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the 
 
152
  accumulation buffer is cleared. The initial values are all 0. 
 
153
  """
 
154
 
 
155
def glClearColor(red, green, blue, alpha):
 
156
  """
 
157
  Specify clear values for the color buffers
 
158
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearcolor.html}
 
159
 
 
160
  @type red, green, blue, alpha: float
 
161
  @param red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the 
 
162
  color buffers are cleared. The initial values are all 0. 
 
163
  """
 
164
 
 
165
def glClearDepth(depth):
 
166
  """
 
167
  Specify the clear value for the depth buffer
 
168
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cleardepth.html}
 
169
 
 
170
  @type depth: int
 
171
  @param depth: Specifies the depth value used when the depth buffer is cleared. 
 
172
  The initial value is 1.  
 
173
  """
 
174
 
 
175
def glClearIndex(c):
 
176
  """
 
177
  Specify the clear value for the color index buffers
 
178
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearindex.html}
 
179
 
 
180
  @type c: float
 
181
  @param c: Specifies the index used when the color index buffers are cleared. 
 
182
  The initial value is 0. 
 
183
  """
 
184
 
 
185
def glClearStencil(s):
 
186
  """
 
187
  Specify the clear value for the stencil buffer
 
188
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearstencil.html}
 
189
 
 
190
  @type s: int
 
191
  @param s: Specifies the index used when the stencil buffer is cleared. The initial value is 0. 
 
192
  """
 
193
 
 
194
def glClipPlane (plane, equation):
 
195
  """
 
196
  Specify a plane against which all geometry is clipped
 
197
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clipplane.html}
 
198
 
 
199
  @type plane: Enumerated constant
 
200
  @param plane: Specifies which clipping plane is being positioned. 
 
201
  @type equation: Buffer object I{type GL_FLOAT} (double)
 
202
  @param equation: Specifies the address of an array of four double- precision floating-point 
 
203
  values. These values are interpreted as a plane equation.
 
204
  """
 
205
 
 
206
def glColor (red, green, blue, alpha):
 
207
  """
 
208
  B{glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub, glColor3ui, glColor3us, 
 
209
  glColor4b, glColor4d, glColor4f, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us, 
 
210
  glColor3bv, glColor3dv, glColor3fv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv, 
 
211
  glColor3usv, glColor4bv, glColor4dv, glColor4fv, glColor4iv, glColor4sv, glColor4ubv, 
 
212
  glColor4uiv, glColor4usv}
 
213
 
 
214
  Set a new color.
 
215
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/color.html}
 
216
 
 
217
  @type red, green, blue, alpha: Depends on function prototype. 
 
218
  @param red, green, blue: Specify new red, green, and blue values for the current color. 
 
219
  @param alpha: Specifies a new alpha value for the current color. Included only in the 
 
220
  four-argument glColor4 commands. (With '4' colors only)
 
221
  """
 
222
 
 
223
def glColorMask(red, green, blue, alpha):
 
224
  """
 
225
  Enable and disable writing of frame buffer color components
 
226
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormask.html}
 
227
 
 
228
  @type red, green, blue, alpha: int (boolean)
 
229
  @param red, green, blue, alpha: Specify whether red, green, blue, and alpha can or cannot be 
 
230
  written into the frame buffer. The initial values are all GL_TRUE, indicating that the 
 
231
  color components can be written. 
 
232
  """
 
233
 
 
234
def glColorMaterial(face, mode):
 
235
  """
 
236
  Cause a material color to track the current color 
 
237
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormaterial.html}
 
238
 
 
239
  @type face: Enumerated constant
 
240
  @param face: Specifies whether front, back, or both front and back material parameters should 
 
241
  track the current color. 
 
242
  @type mode: Enumerated constant
 
243
  @param mode: Specifies which of several material parameters track the current color. 
 
244
  """
 
245
 
 
246
def glCopyPixels(x, y, width, height, type):
 
247
  """
 
248
  Copy pixels in the frame buffer
 
249
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html}
 
250
 
 
251
  @type x, y: int
 
252
  @param x, y: Specify the window coordinates of the lower left corner of the rectangular 
 
253
  region of pixels to be copied. 
 
254
  @type width, height: int
 
255
  @param width,height: Specify the dimensions of the rectangular region of pixels to be copied. 
 
256
  Both must be non-negative. 
 
257
  @type type: Enumerated constant
 
258
  @param type: Specifies whether color values, depth values, or stencil values are to be copied. 
 
259
  """
 
260
  
 
261
def glCopyTexImage2D(target, level, internalformat, x, y, width, height, border):
 
262
  """
 
263
  Copy pixels into a 2D texture image
 
264
  @see: U{www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml}
 
265
 
 
266
  @type target: Enumerated constant
 
267
  @param target: Specifies the target texture. 
 
268
  @type level: int
 
269
  @param level: Specifies the level-of-detail number. Level 0 is the base image level. 
 
270
  Level n is the nth mipmap reduction image. 
 
271
  @type internalformat: int
 
272
  @param internalformat: Specifies the number of color components in the texture. 
 
273
  @type width: int
 
274
  @type x, y: int
 
275
  @param x, y:Specify the window coordinates of the first pixel that is copied 
 
276
  from the frame buffer. This location is the lower left corner of a rectangular
 
277
  block of pixels.
 
278
  @param width: Specifies the width of the texture image. Must be 2n+2(border) for 
 
279
  some integer n. All implementations support texture images that are at least 64 
 
280
  texels wide. 
 
281
  @type height: int
 
282
  @param height: Specifies the height of the texture image. Must be 2m+2(border) for 
 
283
  some integer m. All implementations support texture images that are at least 64 
 
284
  texels high. 
 
285
  @type border: int
 
286
  @param border: Specifies the width of the border. Must be either 0 or 1. 
 
287
  """
 
288
 
 
289
def glCullFace(mode):
 
290
  """
 
291
  Specify whether front- or back-facing facets can be culled 
 
292
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cullface.html}
 
293
 
 
294
  @type mode: Enumerated constant
 
295
  @param mode: Specifies whether front- or back-facing facets are candidates for culling. 
 
296
  """
 
297
 
 
298
def glDeleteLists(list, range):
 
299
  """
 
300
  Delete a contiguous group of display lists
 
301
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletelists.html}
 
302
 
 
303
  @type list: unsigned int
 
304
  @param list: Specifies the integer name of the first display list to delete
 
305
  @type range: int
 
306
  @param range: Specifies the number of display lists to delete
 
307
  """
 
308
 
 
309
def glDeleteTextures(n, textures):
 
310
  """
 
311
  Delete named textures
 
312
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletetextures.html}
 
313
 
 
314
  @type n: int
 
315
  @param n: Specifies the number of textures to be deleted
 
316
  @type textures: Buffer I{GL_INT}
 
317
  @param textures: Specifies an array of textures to be deleted
 
318
  """
 
319
 
 
320
def glDepthFunc(func):
 
321
  """
 
322
  Specify the value used for depth buffer comparisons 
 
323
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthfunc.html}
 
324
 
 
325
  @type func: Enumerated constant
 
326
  @param func: Specifies the depth comparison function. 
 
327
  """
 
328
 
 
329
def glDepthMask(flag):
 
330
  """
 
331
  Enable or disable writing into the depth buffer
 
332
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthmask.html}
 
333
 
 
334
  @type flag: int (boolean)
 
335
  @param flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
 
336
  depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer 
 
337
  writing is enabled. 
 
338
  """
 
339
 
 
340
def glDepthRange(zNear, zFar):
 
341
  """
 
342
  Specify mapping of depth values from normalized device coordinates to window coordinates 
 
343
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthrange.html}
 
344
 
 
345
  @type zNear: int
 
346
  @param zNear: Specifies the mapping of the near clipping plane to window coordinates. 
 
347
  The initial value is 0. 
 
348
  @type zFar: int
 
349
  @param zFar: Specifies the mapping of the far clipping plane to window coordinates. 
 
350
  The initial value is 1. 
 
351
  """
 
352
 
 
353
def glDisable(cap):
 
354
  """
 
355
  Disable server-side GL capabilities
 
356
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html}
 
357
 
 
358
  @type cap: Enumerated constant
 
359
  @param cap: Specifies a symbolic constant indicating a GL capability.
 
360
  """
 
361
 
 
362
def glDrawBuffer(mode):
 
363
  """
 
364
  Specify which color buffers are to be drawn into
 
365
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawbuffer.html}
 
366
 
 
367
  @type mode: Enumerated constant
 
368
  @param mode: Specifies up to four color buffers to be drawn into. 
 
369
  """
 
370
 
 
371
def glDrawPixels(width, height, format, type, pixels):
 
372
  """
 
373
  Write a block of pixels to the frame buffer
 
374
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html}
 
375
 
 
376
  @type width, height: int
 
377
  @param width, height: Specify the dimensions of the pixel rectangle to be 
 
378
  written into the frame buffer. 
 
379
  @type format: Enumerated constant
 
380
  @param format: Specifies the format of the pixel data. 
 
381
  @type type: Enumerated constant
 
382
  @param type: Specifies the data type for pixels. 
 
383
  @type pixels: Buffer object 
 
384
  @param pixels: Specifies a pointer to the pixel data. 
 
385
  """
 
386
 
 
387
def glEdgeFlag (flag):
 
388
  """
 
389
  B{glEdgeFlag, glEdgeFlagv}
 
390
 
 
391
  Flag edges as either boundary or non-boundary
 
392
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/edgeflag.html}
 
393
 
 
394
  @type flag: Depends of function prototype
 
395
  @param flag: Specifies the current edge flag value.The initial value is GL_TRUE. 
 
396
  """
 
397
 
 
398
def glEnable(cap):
 
399
  """
 
400
  Enable server-side GL capabilities
 
401
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html}
 
402
 
 
403
  @type cap: Enumerated constant
 
404
  @param cap: Specifies a symbolic constant indicating a GL capability.
 
405
  """
 
406
 
 
407
def glEnd():
 
408
  """
 
409
  Delimit the vertices of a primitive or group of like primitives
 
410
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html}
 
411
  """
 
412
 
 
413
def glEndList():
 
414
  """
 
415
  Create or replace a display list
 
416
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html}
 
417
  """
 
418
 
 
419
def glEvalCoord (u,v):
 
420
  """
 
421
  B{glEvalCoord1d, glEvalCoord1f, glEvalCoord2d, glEvalCoord2f, glEvalCoord1dv, glEvalCoord1fv, 
 
422
  glEvalCoord2dv, glEvalCoord2fv}
 
423
 
 
424
  Evaluate enabled one- and two-dimensional maps
 
425
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalcoord.html}
 
426
 
 
427
  @type u: Depends on function prototype.
 
428
  @param u: Specifies a value that is the domain coordinate u to the basis function defined 
 
429
  in a previous glMap1 or glMap2 command. If the function prototype ends in 'v' then
 
430
  u specifies a pointer to an array containing either one or two domain coordinates. The first 
 
431
  coordinate is u. The second coordinate is v, which is present only in glEvalCoord2 versions. 
 
432
  @type v: Depends on function prototype. (only with '2' prototypes)
 
433
  @param v: Specifies a value that is the domain coordinate v to the basis function defined 
 
434
  in a previous glMap2 command. This argument is not present in a glEvalCoord1 command. 
 
435
  """
 
436
 
 
437
def glEvalMesh (mode, i1, i2):
 
438
  """
 
439
  B{glEvalMesh1 or glEvalMesh2}
 
440
 
 
441
  Compute a one- or two-dimensional grid of points or lines
 
442
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalmesh.html}
 
443
 
 
444
  @type mode: Enumerated constant
 
445
  @param mode: In glEvalMesh1, specifies whether to compute a one-dimensional 
 
446
  mesh of points or lines.
 
447
  @type i1, i2: int
 
448
  @param i1, i2: Specify the first and last integer values for the grid domain variable i.
 
449
  """
 
450
 
 
451
def glEvalPoint (i, j):
 
452
  """
 
453
  B{glEvalPoint1 and glEvalPoint2}
 
454
 
 
455
  Generate and evaluate a single point in a mesh
 
456
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalpoint.html}
 
457
 
 
458
  @type i: int
 
459
  @param i: Specifies the integer value for grid domain variable i.
 
460
  @type j: int (only with '2' prototypes)
 
461
  @param j: Specifies the integer value for grid domain variable j (glEvalPoint2 only).
 
462
  """
 
463
 
 
464
def glFeedbackBuffer (size, type, buffer):
 
465
  """
 
466
  Controls feedback mode
 
467
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html}
 
468
 
 
469
  @type size: int
 
470
  @param size:Specifies the maximum number of values that can be written into buffer. 
 
471
  @type type: Enumerated constant
 
472
  @param type:Specifies a symbolic constant that describes the information that 
 
473
  will be returned for each vertex. 
 
474
  @type buffer: Buffer object I{GL_FLOAT}
 
475
  @param buffer: Returns the feedback data. 
 
476
  """
 
477
 
 
478
def glFinish():
 
479
  """
 
480
  Block until all GL execution is complete
 
481
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/finish.html}
 
482
  """
 
483
 
 
484
def glFlush():
 
485
  """
 
486
  Force Execution of GL commands in finite time
 
487
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/flush.html}
 
488
  """
 
489
 
 
490
def glFog (pname, param):
 
491
  """
 
492
  B{glFogf, glFogi, glFogfv, glFogiv}
 
493
 
 
494
  Specify fog parameters
 
495
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/fog.html}
 
496
 
 
497
  @type pname: Enumerated constant
 
498
  @param pname: Specifies a single-valued fog parameter. If the function prototype
 
499
  ends in 'v' specifies a fog parameter.
 
500
  @type param: Depends on function prototype.
 
501
  @param param: Specifies the value or values to be assigned to pname. GL_FOG_COLOR 
 
502
  requires an array of four values. All other parameters accept an array containing 
 
503
  only a single value. 
 
504
  """
 
505
 
 
506
def glFrontFace(mode):
 
507
  """
 
508
  Define front- and back-facing polygons
 
509
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frontface.html}
 
510
 
 
511
  @type mode: Enumerated constant
 
512
  @param mode: Specifies the orientation of front-facing polygons.
 
513
  """
 
514
 
 
515
def glFrustum(left, right, bottom, top, zNear, zFar):
 
516
  """
 
517
  Multiply the current matrix by a perspective matrix
 
518
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frustum.html}
 
519
 
 
520
  @type left, right: double (float)
 
521
  @param left, right: Specify the coordinates for the left and right vertical 
 
522
  clipping planes. 
 
523
  @type top, bottom: double (float)
 
524
  @param top, bottom: Specify the coordinates for the bottom and top horizontal 
 
525
  clipping planes. 
 
526
  @type zNear, zFar: double (float)
 
527
  @param zNear, zFar: Specify the distances to the near and far depth clipping planes. 
 
528
  Both distances must be positive. 
 
529
  """
 
530
 
 
531
def glGenLists(range):
 
532
  """
 
533
  Generate a contiguous set of empty display lists
 
534
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/genlists.html}
 
535
 
 
536
  @type range: int
 
537
  @param range: Specifies the number of contiguous empty display lists to be generated. 
 
538
  """
 
539
 
 
540
def glGenTextures(n, textures):
 
541
  """
 
542
  Generate texture names
 
543
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gentextures.html}
 
544
 
 
545
  @type n: int
 
546
  @param n: Specifies the number of textures name to be generated.
 
547
  @type textures: Buffer object I{type GL_INT}
 
548
  @param textures: Specifies an array in which the generated textures names are stored.
 
549
  """
 
550
 
 
551
def glGet (pname, param):
 
552
  """
 
553
  B{glGetBooleanv, glGetfloatv, glGetFloatv, glGetIntegerv}
 
554
 
 
555
  Return the value or values of a selected parameter
 
556
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/get.html}
 
557
 
 
558
  @type pname: Enumerated constant
 
559
  @param pname: Specifies the parameter value to be returned. 
 
560
  @type param: Depends on function prototype.
 
561
  @param param: Returns the value or values of the specified parameter. 
 
562
  """
 
563
 
 
564
def glGetClipPlane(plane, equation):
 
565
  """
 
566
  Return the coefficients of the specified clipping plane 
 
567
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getclipplane.html}
 
568
 
 
569
  @type plane: Enumerated constant
 
570
  @param plane: Specifies a clipping plane. The number of clipping planes depends on the 
 
571
  implementation, but at least six clipping planes are supported. They are identified by 
 
572
  symbolic names of the form GL_CLIP_PLANEi where 0 < i < GL_MAX_CLIP_PLANES. 
 
573
  @type equation:  Buffer object I{type GL_FLOAT}
 
574
  @param equation:  Returns four float (double)-precision values that are the coefficients of the
 
575
  plane equation of plane in eye coordinates. The initial value is (0, 0, 0, 0). 
 
576
  """
 
577
 
 
578
def glGetError():
 
579
  """
 
580
  Return error information
 
581
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html}
 
582
  """
 
583
 
 
584
def glGetLight (light, pname, params):
 
585
  """
 
586
  B{glGetLightfv and glGetLightiv}
 
587
 
 
588
  Return light source parameter values
 
589
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getlight.html}
 
590
 
 
591
  @type light: Enumerated constant
 
592
  @param light: Specifies a light source. The number of possible lights depends on the 
 
593
  implementation, but at least eight lights are supported. They are identified by symbolic 
 
594
  names of the form GL_LIGHTi where 0 < i < GL_MAX_LIGHTS. 
 
595
  @type pname: Enumerated constant
 
596
  @param pname: Specifies a light source parameter for light. 
 
597
  @type params:  Buffer object. Depends on function prototype.
 
598
  @param params: Returns the requested data. 
 
599
  """
 
600
 
 
601
def glGetMap (target, query, v):
 
602
  """
 
603
  B{glGetMapdv, glGetMapfv, glGetMapiv}
 
604
 
 
605
  Return evaluator parameters
 
606
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmap.html}
 
607
 
 
608
  @type target: Enumerated constant
 
609
  @param target: Specifies the symbolic name of a map. 
 
610
  @type query: Enumerated constant
 
611
  @param query: Specifies which parameter to return. 
 
612
  @type v: Buffer object. Depends on function prototype.
 
613
  @param v: Returns the requested data. 
 
614
  """
 
615
 
 
616
def glGetMaterial (face, pname, params):
 
617
  """
 
618
  B{glGetMaterialfv, glGetMaterialiv}
 
619
 
 
620
  Return material parameters
 
621
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmaterial.html}
 
622
 
 
623
  @type face: Enumerated constant
 
624
  @param face: Specifies which of the two materials is being queried.  
 
625
  representing the front and back materials, respectively. 
 
626
  @type pname: Enumerated constant
 
627
  @param pname: Specifies the material parameter to return. 
 
628
  @type params: Buffer object. Depends on function prototype.
 
629
  @param params: Returns the requested data. 
 
630
  """
 
631
 
 
632
def glGetPixelMap (map, values):
 
633
  """
 
634
  B{glGetPixelMapfv, glGetPixelMapuiv, glGetPixelMapusv}
 
635
 
 
636
  Return the specified pixel map
 
637
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpixelmap.html}
 
638
 
 
639
  @type map:  Enumerated constant
 
640
  @param map: Specifies the name of the pixel map to return. 
 
641
  @type values: Buffer object. Depends on function prototype.
 
642
  @param values: Returns the pixel map contents. 
 
643
  """
 
644
 
 
645
def glGetPolygonStipple(mask):
 
646
  """
 
647
  Return the polygon stipple pattern
 
648
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html}
 
649
 
 
650
  @type mask: Buffer object I{type GL_BYTE}
 
651
  @param mask: Returns the stipple pattern. The initial value is all 1's.
 
652
  """
 
653
 
 
654
def glGetString(name):
 
655
  """
 
656
  Return a string describing the current GL connection
 
657
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getstring.html}
 
658
 
 
659
  @type name: Enumerated constant
 
660
  @param name: Specifies a symbolic constant. 
 
661
 
 
662
  """
 
663
 
 
664
def glGetTexEnv (target, pname, params):
 
665
  """
 
666
  B{glGetTexEnvfv, glGetTexEnviv}
 
667
 
 
668
  Return texture environment parameters
 
669
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexenv.html}
 
670
 
 
671
  @type target: Enumerated constant
 
672
  @param target: Specifies a texture environment. Must be GL_TEXTURE_ENV. 
 
673
  @type pname: Enumerated constant
 
674
  @param pname: Specifies the symbolic name of a texture environment parameter. 
 
675
  @type params: Buffer object. Depends on function prototype.
 
676
  @param params: Returns the requested data. 
 
677
  """
 
678
 
 
679
def glGetTexGen (coord, pname, params):
 
680
  """
 
681
  B{glGetTexGendv, glGetTexGenfv, glGetTexGeniv}
 
682
 
 
683
  Return texture coordinate generation parameters
 
684
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexgen.html}
 
685
 
 
686
  @type coord: Enumerated constant
 
687
  @param coord: Specifies a texture coordinate. 
 
688
  @type pname: Enumerated constant
 
689
  @param pname: Specifies the symbolic name of the value(s) to be returned. 
 
690
  @type params: Buffer object. Depends on function prototype.
 
691
  @param params: Returns the requested data. 
 
692
  """
 
693
 
 
694
def glGetTexImage(target, level, format, type, pixels):
 
695
  """
 
696
  Return a texture image
 
697
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getteximage.html}
 
698
 
 
699
  @type target: Enumerated constant
 
700
  @param target: Specifies which texture is to be obtained. 
 
701
  @type level: int
 
702
  @param level: Specifies the level-of-detail number of the desired image. 
 
703
  Level 0 is the base image level. Level n is the nth mipmap reduction image. 
 
704
  @type format: Enumerated constant
 
705
  @param format: Specifies a pixel format for the returned data. 
 
706
  @type type: Enumerated constant
 
707
  @param type: Specifies a pixel type for the returned data. 
 
708
  @type pixels: Buffer object.
 
709
  @param pixels: Returns the texture image. Should be a pointer to an array of the 
 
710
  type specified by type
 
711
  """
 
712
 
 
713
def glGetTexLevelParameter (target, level, pname, params):
 
714
  """
 
715
  B{glGetTexLevelParameterfv, glGetTexLevelParameteriv}
 
716
 
 
717
  return texture parameter values for a specific level of detail 
 
718
  @see: U{opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexlevelparameter.html}
 
719
 
 
720
  @type target: Enumerated constant
 
721
  @param target: Specifies the symbolic name of the target texture. 
 
722
  @type level: int
 
723
  @param level: Specifies the level-of-detail number of the desired image. 
 
724
  Level 0 is the base image level. Level n is the nth mipmap reduction image. 
 
725
  @type pname: Enumerated constant
 
726
  @param pname: Specifies the symbolic name of a texture parameter. 
 
727
  @type params: Buffer object. Depends on function prototype.
 
728
  @param params: Returns the requested data.
 
729
  """
 
730
 
 
731
def glGetTexParameter (target, pname, params):
 
732
  """
 
733
  B{glGetTexParameterfv, glGetTexParameteriv}
 
734
 
 
735
  Return texture parameter values 
 
736
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexparameter.html}
 
737
 
 
738
  @type target: Enumerated constant
 
739
  @param target: Specifies the symbolic name of the target texture. 
 
740
  @type pname: Enumerated constant
 
741
  @param pname: Specifies the symbolic name the target texture. 
 
742
  @type params: Buffer object. Depends on function prototype.
 
743
  @param params: Returns the texture parameters.
 
744
  """
 
745
 
 
746
def glHint(target, mode):
 
747
  """
 
748
  Specify implementation-specific hints
 
749
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/hint.html}
 
750
 
 
751
  @type target: Enumerated constant
 
752
  @param target: Specifies a symbolic constant indicating the behavior to be 
 
753
  controlled. 
 
754
  @type mode: Enumerated constant
 
755
  @param mode: Specifies a symbolic constant indicating the desired behavior. 
 
756
  """
 
757
 
 
758
def glIndex (c):
 
759
  """
 
760
  B{glIndexd, glIndexf, glIndexi, glIndexs,  glIndexdv, glIndexfv, glIndexiv, glIndexsv}
 
761
 
 
762
  Set the current color index
 
763
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl}
 
764
 
 
765
  @type c: Buffer object. Depends on function prototype.
 
766
  @param c: Specifies a pointer to a one element array that contains the new value for
 
767
  the current color index.
 
768
  """
 
769
 
 
770
def glInitNames():
 
771
  """
 
772
  Initialize the name stack
 
773
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/initnames.html}
 
774
  """
 
775
 
 
776
def glIsEnabled(cap):
 
777
  """
 
778
  Test whether a capability is enabled
 
779
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/isenabled.html}
 
780
 
 
781
  @type cap: Enumerated constant
 
782
  @param cap: Specifies a constant representing a GL capability.
 
783
  """
 
784
 
 
785
def glIsList(list):
 
786
  """
 
787
  Determine if a name corresponds to a display-list
 
788
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/islist.html}
 
789
 
 
790
  @type list: unsigned int
 
791
  @param list: Specifies a potential display-list name.
 
792
  """
 
793
 
 
794
def glIsTexture(texture):
 
795
  """
 
796
  Determine if a name corresponds to a texture
 
797
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/istexture.html}
 
798
 
 
799
  @type texture: unsigned int
 
800
  @param texture: Specifies a value that may be the name of a texture.
 
801
  """
 
802
 
 
803
def glLight (light, pname, param):
 
804
  """
 
805
  B{glLightf,glLighti, glLightfv, glLightiv}
 
806
 
 
807
  Set the light source parameters
 
808
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/light.html}
 
809
 
 
810
  @type light: Enumerated constant
 
811
  @param light: Specifies a light. The number of lights depends on the implementation, 
 
812
  but at least eight lights are supported. They are identified by symbolic names of the 
 
813
  form GL_LIGHTi where 0 < i < GL_MAX_LIGHTS. 
 
814
  @type pname: Enumerated constant
 
815
  @param pname: Specifies a single-valued light source parameter for light. 
 
816
  @type param: Depends on function prototype.
 
817
  @param param: Specifies the value that parameter pname of light source light will be set to.  
 
818
  If function prototype ends in 'v' specifies a pointer to the value or values that 
 
819
  parameter pname of light source light will be set to. 
 
820
  """
 
821
 
 
822
def glLightModel (pname, param):
 
823
  """
 
824
  B{glLightModelf, glLightModeli, glLightModelfv, glLightModeliv}
 
825
 
 
826
  Set the lighting model parameters
 
827
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/lightmodel.html}
 
828
 
 
829
  @type pname:  Enumerated constant
 
830
  @param pname: Specifies a single-value light model parameter. 
 
831
  @type param: Depends on function prototype.
 
832
  @param param: Specifies the value that param will be set to. If function prototype ends in 'v'
 
833
  specifies a pointer to the value or values that param will be set to.
 
834
  """
 
835
 
 
836
def glLineStipple(factor, pattern):
 
837
  """
 
838
  Specify the line stipple pattern
 
839
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linestipple.html}
 
840
 
 
841
  @type factor: int
 
842
  @param factor: Specifies a multiplier for each bit in the line stipple pattern. 
 
843
  If factor is 3, for example, each bit in the pattern is used three times before 
 
844
  the next bit in the pattern is used. factor is clamped to the range [1, 256] and 
 
845
  defaults to 1. 
 
846
  @type pattern: unsigned short int
 
847
  @param pattern: Specifies a 16-bit integer whose bit pattern determines which fragments 
 
848
  of a line will be drawn when the line is rasterized. Bit zero is used first; the default 
 
849
  pattern is all 1's. 
 
850
  """
 
851
 
 
852
def glLineWidth(width):
 
853
  """
 
854
  Specify the width of rasterized lines.
 
855
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linewidth.html}
 
856
 
 
857
  @type width: float
 
858
  @param width: Specifies the width of rasterized lines. The initial value is 1. 
 
859
  """
 
860
 
 
861
def glListBase(base):
 
862
  """
 
863
  Set the display-list base for glCallLists 
 
864
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/listbase.html}
 
865
 
 
866
  @type base: unsigned int
 
867
  @param base: Specifies an integer offset that will be added to glCallLists 
 
868
  offsets to generate display-list names. The initial value is 0.
 
869
  """
 
870
 
 
871
def glLoadIdentity():
 
872
  """
 
873
  Replace the current matrix with the identity matrix 
 
874
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadidentity.html}
 
875
  """
 
876
 
 
877
def glLoadMatrix (m):
 
878
  """
 
879
  B{glLoadMatrixd, glLoadMatixf}
 
880
 
 
881
  Replace the current matrix with the specified matrix 
 
882
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadmatrix.html}
 
883
 
 
884
  @type m: Buffer object. Depends on function prototype.
 
885
  @param m: Specifies a pointer to 16 consecutive values, which are used as the elements 
 
886
  of a 4x4 column-major matrix. 
 
887
  """
 
888
 
 
889
def glLoadName(name):
 
890
  """
 
891
  Load a name onto the name stack.
 
892
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadname.html}
 
893
 
 
894
  @type name: unsigned int
 
895
  @param name: Specifies a name that will replace the top value on the name stack. 
 
896
  """
 
897
 
 
898
def glLogicOp(opcode):
 
899
  """
 
900
  Specify a logical pixel operation for color index rendering 
 
901
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/logicop.html}
 
902
 
 
903
  @type opcode: Enumerated constant
 
904
  @param opcode: Specifies a symbolic constant that selects a logical operation. 
 
905
  """
 
906
 
 
907
def glMap1 (target, u1, u2, stride, order, points):
 
908
  """
 
909
  B{glMap1d, glMap1f}
 
910
 
 
911
  Define a one-dimensional evaluator
 
912
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map1.html}
 
913
 
 
914
  @type target: Enumerated constant
 
915
  @param target: Specifies the kind of values that are generated by the evaluator. 
 
916
  @type u1, u2: Depends on function prototype.
 
917
  @param u1,u2: Specify a linear mapping of u, as presented to glEvalCoord1, to ^, t
 
918
  he variable that is evaluated by the equations specified by this command. 
 
919
  @type stride: int
 
920
  @param stride: Specifies the number of floats or float (double)s between the beginning 
 
921
  of one control point and the beginning of the next one in the data structure 
 
922
  referenced in points. This allows control points to be embedded in arbitrary data 
 
923
  structures. The only constraint is that the values for a particular control point must 
 
924
  occupy contiguous memory locations. 
 
925
  @type order: int
 
926
  @param order: Specifies the number of control points. Must be positive. 
 
927
  @type points: Buffer object. Depends on function prototype.
 
928
  @param points: Specifies a pointer to the array of control points. 
 
929
  """
 
930
 
 
931
def glMap2 (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points):
 
932
  """
 
933
  B{glMap2d, glMap2f}
 
934
 
 
935
  Define a two-dimensional evaluator
 
936
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map2.html}
 
937
 
 
938
  @type target: Enumerated constant
 
939
  @param target: Specifies the kind of values that are generated by the evaluator. 
 
940
  @type u1, u2: Depends on function prototype.
 
941
  @param u1,u2: Specify a linear mapping of u, as presented to glEvalCoord2, to ^, t
 
942
  he variable that is evaluated by the equations specified by this command. Initially
 
943
  u1 is 0 and u2 is 1.
 
944
  @type ustride: int
 
945
  @param ustride: Specifies the number of floats or float (double)s between the beginning 
 
946
  of control point R and the beginning of control point R ij, where i and j are the u 
 
947
  and v control point indices, respectively. This allows control points to be embedded 
 
948
  in arbitrary data structures. The only constraint is that the values for a particular 
 
949
  control point must occupy contiguous memory locations. The initial value of ustride is 0. 
 
950
  @type uorder: int
 
951
  @param uorder: Specifies the dimension of the control point array in the u axis. 
 
952
  Must be positive. The initial value is 1. 
 
953
  @type v1, v2: Depends on function prototype.
 
954
  @param v1, v2: Specify a linear mapping of v, as presented to glEvalCoord2, to ^, 
 
955
  one of the two variables that are evaluated by the equations specified by this command. 
 
956
  Initially, v1 is 0 and v2 is 1. 
 
957
  @type vstride: int
 
958
  @param vstride: Specifies the number of floats or float (double)s between the beginning of control 
 
959
  point R and the beginning of control point R ij, where i and j are the u and v control 
 
960
  point(indices, respectively. This allows control points to be embedded in arbitrary data
 
961
  structures. The only constraint is that the values for a particular control point must 
 
962
  occupy contiguous memory locations. The initial value of vstride is 0. 
 
963
  @type vorder: int
 
964
  @param vorder: Specifies the dimension of the control point array in the v axis. 
 
965
  Must be positive. The initial value is 1. 
 
966
  @type points: Buffer object. Depends on function prototype.
 
967
  @param points: Specifies a pointer to the array of control points. 
 
968
  """
 
969
 
 
970
def glMapGrid (un, u1,u2 ,vn, v1, v2):
 
971
  """
 
972
  B{glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f}
 
973
 
 
974
  Define a one- or two-dimensional mesh
 
975
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/mapgrid.html}
 
976
 
 
977
  @type un: int
 
978
  @param un: Specifies the number of partitions in the grid range interval 
 
979
  [u1, u2]. Must be positive. 
 
980
  @type u1, u2: Depends on function prototype.
 
981
  @param u1, u2: Specify the mappings for integer grid domain values i=0 and i=un. 
 
982
  @type vn: int
 
983
  @param vn: Specifies the number of partitions in the grid range interval [v1, v2] 
 
984
  (glMapGrid2 only). 
 
985
  @type v1, v2: Depends on function prototype.
 
986
  @param v1, v2: Specify the mappings for integer grid domain values j=0 and j=vn 
 
987
  (glMapGrid2 only). 
 
988
  """
 
989
 
 
990
def glMaterial (face, pname, params):
 
991
  """
 
992
  Specify material parameters for the lighting model.
 
993
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/material.html}
 
994
  
 
995
  @type face: Enumerated constant
 
996
  @param face: Specifies which face or faces are being updated. Must be one of:
 
997
  @type pname: Enumerated constant
 
998
  @param pname: Specifies the single-valued material parameter of the face 
 
999
  or faces that is being updated. Must be GL_SHININESS. 
 
1000
  @type params: int
 
1001
  @param params: Specifies the value that parameter GL_SHININESS will be set to. 
 
1002
  If function prototype ends in 'v' specifies a pointer to the value or values that 
 
1003
  pname will be set to. 
 
1004
  """
 
1005
 
 
1006
def glMatrixMode(mode):
 
1007
  """
 
1008
  Specify which matrix is the current matrix.
 
1009
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/matrixmode.html}
 
1010
 
 
1011
  @type mode: Enumerated constant
 
1012
  @param mode: Specifies which matrix stack is the target for subsequent matrix operations. 
 
1013
  """
 
1014
 
 
1015
def glMultMatrix (m):
 
1016
  """
 
1017
  B{glMultMatrixd, glMultMatrixf}
 
1018
 
 
1019
  Multiply the current matrix with the specified matrix
 
1020
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/multmatrix.html}
 
1021
 
 
1022
  @type m: Buffer object. Depends on function prototype.
 
1023
  @param m: Points to 16 consecutive values that are used as the elements of a 4x4 column
 
1024
  major matrix.
 
1025
  """
 
1026
 
 
1027
def glNewList(list, mode):
 
1028
  """
 
1029
  Create or replace a display list
 
1030
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html}
 
1031
  
 
1032
  @type list: unsigned int
 
1033
  @param list: Specifies the display list name
 
1034
  @type mode: Enumerated constant
 
1035
  @param mode: Specifies the compilation mode.
 
1036
  """
 
1037
 
 
1038
def glNormal3 (nx, ny, nz, v):
 
1039
  """
 
1040
  B{Normal3b, Normal3bv, Normal3d, Normal3dv, Normal3f, Normal3fv, Normal3i, Normal3iv,
 
1041
  Normal3s, Normal3sv}
 
1042
 
 
1043
  Set the current normal vector
 
1044
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/normal.html}
 
1045
  
 
1046
  @type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
 
1047
  @param nx, ny, nz: Specify the x, y, and z coordinates of the new current normal. 
 
1048
  The initial value of the current normal is the unit vector, (0, 0, 1). 
 
1049
  @type v: Buffer object. Depends on function prototype. ('v' prototypes)
 
1050
  @param v: Specifies a pointer to an array of three elements: the x, y, and z coordinates
 
1051
  of the new current normal.
 
1052
  """
 
1053
  
 
1054
def glOrtho(left, right, bottom, top, zNear, zFar):
 
1055
  """
 
1056
  Multiply the current matrix with an orthographic matrix
 
1057
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/ortho.html}
 
1058
  
 
1059
  @type left, right: double (float)
 
1060
  @param left, right: Specify the coordinates for the left and 
 
1061
  right vertical clipping planes. 
 
1062
  @type bottom, top: double (float)
 
1063
  @param bottom, top: Specify the coordinates for the bottom and top 
 
1064
  horizontal clipping planes. 
 
1065
  @type zNear, zFar: double (float)
 
1066
  @param zNear, zFar: Specify the distances to the nearer and farther 
 
1067
  depth clipping planes. These values are negative if the plane is to be behind the viewer. 
 
1068
  """
 
1069
 
 
1070
def glPassThrough(token):
 
1071
  """
 
1072
  Place a marker in the feedback buffer
 
1073
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/passthrough.html}
 
1074
 
 
1075
  @type token: float
 
1076
  @param token: Specifies a marker value to be placed in the feedback 
 
1077
  buffer following a GL_PASS_THROUGH_TOKEN. 
 
1078
  """
 
1079
 
 
1080
def glPixelMap (map, mapsize, values):
 
1081
  """
 
1082
  B{glPixelMapfv, glPixelMapuiv, glPixelMapusv}
 
1083
 
 
1084
  Set up pixel transfer maps
 
1085
  @see:  U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelmap.html}
 
1086
 
 
1087
  @type map: Enumerated constant
 
1088
  @param map: Specifies a symbolic map name.
 
1089
  @type mapsize: int
 
1090
  @param mapsize: Specifies the size of the map being defined. 
 
1091
  @type values: Buffer object. Depends on function prototype.
 
1092
  @param values: Specifies an array of mapsize values. 
 
1093
  """
 
1094
 
 
1095
def glPixelStore (pname, param):
 
1096
  """
 
1097
  B{glPixelStoref, glPixelStorei}
 
1098
 
 
1099
  Set pixel storage modes
 
1100
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelstore.html}
 
1101
  
 
1102
  @type pname: Enumerated constant
 
1103
  @param pname: Specifies the symbolic name of the parameter to be set. 
 
1104
  Six values affect the packing of pixel data into memory.
 
1105
  Six more affect the unpacking of pixel data from memory. 
 
1106
  @type param: Depends on function prototype.
 
1107
  @param param: Specifies the value that pname is set to. 
 
1108
  """
 
1109
 
 
1110
def glPixelTransfer (pname, param):
 
1111
  """
 
1112
  B{glPixelTransferf, glPixelTransferi}
 
1113
 
 
1114
  Set pixel transfer modes
 
1115
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixeltransfer.html}
 
1116
 
 
1117
  @type pname: Enumerated constant
 
1118
  @param pname: Specifies the symbolic name of the pixel transfer parameter to be set. 
 
1119
  @type param: Depends on function prototype.
 
1120
  @param param: Specifies the value that pname is set to. 
 
1121
  """
 
1122
 
 
1123
def glPixelZoom(xfactor, yfactor):
 
1124
  """
 
1125
  Specify the pixel zoom factors
 
1126
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelzoom.html}
 
1127
  
 
1128
  @type xfactor, yfactor: float
 
1129
  @param xfactor, yfactor: Specify the x and y zoom factors for pixel write operations.
 
1130
  """
 
1131
 
 
1132
def glPointSize(size):
 
1133
  """
 
1134
  Specify the diameter of rasterized points
 
1135
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pointsize.html}
 
1136
  
 
1137
  @type size: float
 
1138
  @param size: Specifies the diameter of rasterized points. The initial value is 1.
 
1139
  """
 
1140
 
 
1141
def glPolygonMode(face, mode):
 
1142
  """
 
1143
  Select a polygon rasterization mode
 
1144
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonmode.html}
 
1145
 
 
1146
  @type face: Enumerated constant
 
1147
  @param face: Specifies the polygons that mode applies to. 
 
1148
  Must be GL_FRONT for front-facing polygons, GL_BACK for back- facing polygons, 
 
1149
  or GL_FRONT_AND_BACK for front- and back-facing polygons. 
 
1150
  @type mode: Enumerated constant
 
1151
  @param mode: Specifies how polygons will be rasterized. 
 
1152
  The initial value is GL_FILL for both front- and back- facing polygons. 
 
1153
  """
 
1154
 
 
1155
def glPolygonOffset(factor, units):
 
1156
  """
 
1157
  Set the scale and units used to calculate depth values
 
1158
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonoffset.html}
 
1159
  
 
1160
  @type factor: float
 
1161
  @param factor: Specifies a scale factor that is used to create a variable depth 
 
1162
  offset for each polygon. The initial value is 0. 
 
1163
  @type units:  float
 
1164
  @param units: Is multiplied by an implementation-specific value to create a constant
 
1165
  depth offset. The initial value is 0. 
 
1166
  """
 
1167
 
 
1168
def glPolygonStipple(mask):
 
1169
  """
 
1170
  Set the polygon stippling pattern
 
1171
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonstipple.html}
 
1172
  
 
1173
  @type mask: Buffer object I{type GL_BYTE}
 
1174
  @param mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked 
 
1175
  from memory in the same way that glDrawPixels unpacks pixels. 
 
1176
  """
 
1177
 
 
1178
def glPopAttrib():
 
1179
  """
 
1180
  Pop the server attribute stack
 
1181
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html}
 
1182
  """
 
1183
 
 
1184
def glPopClientAttrib():
 
1185
  """
 
1186
  Pop the client attribute stack
 
1187
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html}
 
1188
  """
 
1189
 
 
1190
def glPopMatrix():
 
1191
  """
 
1192
  Pop the current matrix stack
 
1193
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html}
 
1194
  """
 
1195
 
 
1196
def glPopName():
 
1197
  """
 
1198
  Pop the name stack
 
1199
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html}
 
1200
  """
 
1201
 
 
1202
def glPrioritizeTextures(n, textures, priorities):
 
1203
  """
 
1204
  Set texture residence priority
 
1205
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/prioritizetextures.html}
 
1206
  
 
1207
  @type n: int
 
1208
  @param n:Specifies the number of textures to be prioritized. 
 
1209
  @type textures: Buffer I{type GL_INT}
 
1210
  @param textures: Specifies an array containing the names of the textures to be prioritized. 
 
1211
  @type priorities: Buffer I{type GL_FLOAT}
 
1212
  @param priorities: Specifies an array containing the texture priorities. A priority given 
 
1213
  in an element of priorities applies to the texture named by the corresponding element of textures. 
 
1214
  """
 
1215
 
 
1216
def glPushAttrib(mask):
 
1217
  """
 
1218
  Push the server attribute stack
 
1219
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html}
 
1220
 
 
1221
  @type mask: Enumerated constant(s)
 
1222
  @param mask: Specifies a mask that indicates which attributes to save.
 
1223
  """
 
1224
 
 
1225
def glPushClientAttrib(mask):
 
1226
  """
 
1227
  Push the client attribute stack
 
1228
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html}
 
1229
 
 
1230
  @type mask: Enumerated constant(s)
 
1231
  @param mask: Specifies a mask that indicates which attributes to save.
 
1232
  """
 
1233
 
 
1234
def glPushMatrix():
 
1235
  """
 
1236
  Push the current matrix stack
 
1237
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html}
 
1238
  """
 
1239
 
 
1240
def glPushName(name):
 
1241
  """
 
1242
  Push the name stack
 
1243
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html}
 
1244
 
 
1245
  @type name: unsigned int
 
1246
  @param name: Specifies a name that will be pushed onto the name stack.
 
1247
  """
 
1248
 
 
1249
def glRasterPos (x,y,z,w):
 
1250
  """
 
1251
  B{glRasterPos2d, glRasterPos2f, glRasterPos2i, glRasterPos2s, glRasterPos3d, 
 
1252
  glRasterPos3f, glRasterPos3i, glRasterPos3s, glRasterPos4d, glRasterPos4f, 
 
1253
  glRasterPos4i, glRasterPos4s, glRasterPos2dv, glRasterPos2fv, glRasterPos2iv, 
 
1254
  glRasterPos2sv, glRasterPos3dv, glRasterPos3fv, glRasterPos3iv, glRasterPos3sv, 
 
1255
  glRasterPos4dv, glRasterPos4fv, glRasterPos4iv, glRasterPos4sv}
 
1256
 
 
1257
  Specify the raster position for pixel operations
 
1258
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rasterpos.html}
 
1259
 
 
1260
  @type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
 
1261
  @param x, y, z, w: Specify the x,y,z, and w object coordinates (if present) for the 
 
1262
  raster position.  If function prototype ends in 'v' specifies a pointer to an array of two, 
 
1263
  three, or four elements, specifying x, y, z, and w coordinates, respectively.
 
1264
  @note:
 
1265
    If you are drawing to the 3d view with a Scriptlink of a space handler
 
1266
    the zoom level of the panels will scale the glRasterPos by the view matrix.
 
1267
    so a X of 10 will not always offset 10 pixels as you would expect.
 
1268
 
 
1269
    To work around this get the scale value of the view matrix and use it to scale your pixel values.
 
1270
  """
 
1271
 
 
1272
def glReadBuffer(mode):
 
1273
  """
 
1274
  Select a color buffer source for pixels.
 
1275
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html}
 
1276
  
 
1277
  @type mode: Enumerated constant
 
1278
  @param mode: Specifies a color buffer. 
 
1279
  """
 
1280
 
 
1281
def glReadPixels(x, y, width, height, format, type, pixels):
 
1282
  """
 
1283
  Read a block of pixels from the frame buffer
 
1284
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html}
 
1285
  
 
1286
  @type x, y: int
 
1287
  @param x, y:Specify the window coordinates of the first pixel that is read 
 
1288
  from the frame buffer. This location is the lower left corner of a rectangular
 
1289
  block of pixels. 
 
1290
  @type width, height: int
 
1291
  @param width, height: Specify the dimensions of the pixel rectangle. width and 
 
1292
  height of one correspond to a single pixel. 
 
1293
  @type format: Enumerated constant
 
1294
  @param format: Specifies the format of the pixel data. 
 
1295
  @type type: Enumerated constant
 
1296
  @param type: Specifies the data type of the pixel data. 
 
1297
  @type pixels: Buffer object
 
1298
  @param pixels: Returns the pixel data. 
 
1299
  """
 
1300
 
 
1301
def glRect (x1,y1,x2,y2,v1,v2):
 
1302
  """
 
1303
  B{glRectd, glRectf, glRecti, glRects, glRectdv, glRectfv, glRectiv, glRectsv}
 
1304
 
 
1305
  Draw a rectangle
 
1306
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rect.html}
 
1307
 
 
1308
  @type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
 
1309
  @param x1, y1: Specify one vertex of a rectangle
 
1310
  @type x2, y2: Depends on function prototype. (for non 'v' prototypes only)
 
1311
  @param x2, y2: Specify the opposite vertex of the rectangle
 
1312
  @type v1, v2: Depends on function prototype. (for 'v' prototypes only)
 
1313
  @param v1, v2: Specifies a pointer to one vertex of a rectangle and the pointer
 
1314
  to the opposite vertex of the rectangle
 
1315
  """
 
1316
 
 
1317
def glRenderMode(mode):
 
1318
  """
 
1319
  Set rasterization mode
 
1320
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rendermode.html}
 
1321
  
 
1322
  @type mode: Enumerated constant
 
1323
  @param mode: Specifies the rasterization mode. 
 
1324
  """
 
1325
 
 
1326
def glRotate (angle, x, y, z):
 
1327
  """
 
1328
  B{glRotated, glRotatef}
 
1329
 
 
1330
  Multiply the current matrix by a rotation matrix
 
1331
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rotate.html}
 
1332
 
 
1333
  @type angle:  Depends on function prototype.
 
1334
  @param angle:  Specifies the angle of rotation in degrees.
 
1335
  @type x, y, z:  Depends on function prototype.
 
1336
  @param x, y, z:  Specify the x, y, and z coordinates of a vector respectively.
 
1337
  """
 
1338
 
 
1339
def glScale (x,y,z):
 
1340
  """
 
1341
  B{glScaled, glScalef}
 
1342
 
 
1343
  Multiply the current matrix by a general scaling matrix
 
1344
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scale.html}
 
1345
 
 
1346
  @type x, y, z: Depends on function prototype.
 
1347
  @param x, y, z: Specify scale factors along the x, y, and z axes, respectively.
 
1348
  """
 
1349
 
 
1350
def glScissor(x,y,width,height):
 
1351
  """
 
1352
  Define the scissor box
 
1353
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scissor.html}
 
1354
 
 
1355
  @type x, y: int
 
1356
  @param x, y: Specify the lower left corner of the scissor box. Initially (0, 0). 
 
1357
  @type width, height: int
 
1358
  @param width, height: Specify the width and height of the scissor box. When a 
 
1359
  GL context is first attached to a window, width and height are set to the 
 
1360
  dimensions of that window. 
 
1361
  """
 
1362
 
 
1363
def glSelectBuffer(size, buffer):
 
1364
  """
 
1365
  Establish a buffer for selection mode values
 
1366
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/selectbuffer.html}
 
1367
 
 
1368
  @type size: int
 
1369
  @param size: Specifies the size of buffer
 
1370
  @type buffer: Buffer I{type GL_INT}
 
1371
  @param buffer: Returns the selection data
 
1372
  """
 
1373
 
 
1374
def glShadeModel(mode):
 
1375
  """
 
1376
  Select flat or smooth shading
 
1377
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/shademodel.html}
 
1378
  
 
1379
  @type mode: Enumerated constant
 
1380
  @param mode: Specifies a symbolic value representing a shading technique.  
 
1381
  """
 
1382
 
 
1383
def glStencilFuc(func, ref, mask):
 
1384
  """
 
1385
  Set function and reference value for stencil testing
 
1386
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilfunc.html}
 
1387
 
 
1388
  @type func: Enumerated constant
 
1389
  @param func:Specifies the test function. 
 
1390
  @type ref: int
 
1391
  @param ref:Specifies the reference value for the stencil test. ref is clamped to 
 
1392
  the range [0,2n-1], where n is the number of bitplanes in the stencil buffer. 
 
1393
  The initial value is 0.
 
1394
  @type mask: unsigned int
 
1395
  @param mask:Specifies a mask that is ANDed with both the reference value and 
 
1396
  the stored stencil value when the test is done. The initial value is all 1's. 
 
1397
  """
 
1398
 
 
1399
def glStencilMask(mask):
 
1400
  """
 
1401
  Control the writing of individual bits in the stencil planes
 
1402
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilmask.html}
 
1403
  
 
1404
  @type mask: unsigned int
 
1405
  @param mask: Specifies a bit mask to enable and disable writing of individual bits 
 
1406
  in the stencil planes. Initially, the mask is all 1's. 
 
1407
  """
 
1408
 
 
1409
def glStencilOp(fail, zfail, zpass):
 
1410
  """
 
1411
  Set stencil test actions
 
1412
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilop.html}
 
1413
  
 
1414
  @type fail: Enumerated constant
 
1415
  @param fail: Specifies the action to take when the stencil test fails. 
 
1416
  The initial value is GL_KEEP. 
 
1417
  @type zfail: Enumerated constant
 
1418
  @param zfail: Specifies the stencil action when the stencil test passes, but the 
 
1419
  depth test fails. zfail accepts the same symbolic constants as fail. 
 
1420
  The initial value is GL_KEEP. 
 
1421
  @type zpass: Enumerated constant
 
1422
  @param zpass: Specifies the stencil action when both the stencil test and the 
 
1423
  depth test pass, or when the stencil test passes and either there is no depth 
 
1424
  buffer or depth testing is not enabled. zpass accepts the same symbolic constants 
 
1425
  as fail. The initial value is GL_KEEP.
 
1426
  """
 
1427
 
 
1428
def glTexCoord (s,t,r,q,v): 
 
1429
  """
 
1430
  B{glTexCoord1d, glTexCoord1f, glTexCoord1i, glTexCoord1s, glTexCoord2d, glTexCoord2f, 
 
1431
  glTexCoord2i, glTexCoord2s, glTexCoord3d, glTexCoord3f, glTexCoord3i, glTexCoord3s, 
 
1432
  glTexCoord4d, glTexCoord4f, glTexCoord4i, glTexCoord4s, glTexCoord1dv, glTexCoord1fv, 
 
1433
  glTexCoord1iv, glTexCoord1sv, glTexCoord2dv, glTexCoord2fv, glTexCoord2iv, 
 
1434
  glTexCoord2sv, glTexCoord3dv, glTexCoord3fv, glTexCoord3iv, glTexCoord3sv, 
 
1435
  glTexCoord4dv, glTexCoord4fv, glTexCoord4iv, glTexCoord4sv}
 
1436
 
 
1437
  Set the current texture coordinates
 
1438
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texcoord.html}
 
1439
  
 
1440
  @type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
 
1441
  @param s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are 
 
1442
  present in all forms of the command. 
 
1443
  @type v: Buffer object. Depends on function prototype. (for 'v' prototypes only)
 
1444
  @param v: Specifies a pointer to an array of one, two, three, or four elements, 
 
1445
  which in turn specify the s, t, r, and q texture coordinates. 
 
1446
  """
 
1447
 
 
1448
def glTexEnv  (target, pname, param):
 
1449
  """
 
1450
  B{glTextEnvf, glTextEnvi, glTextEnvfv, glTextEnviv}
 
1451
 
 
1452
  Set texture environment parameters
 
1453
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texenv.html} 
 
1454
 
 
1455
  @type target: Enumerated constant
 
1456
  @param target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
 
1457
  @type pname: Enumerated constant
 
1458
  @param pname: Specifies the symbolic name of a single-valued texture environment 
 
1459
  parameter. Must be GL_TEXTURE_ENV_MODE. 
 
1460
  @type param: Depends on function prototype.
 
1461
  @param param: Specifies a single symbolic constant. If function prototype ends in 'v'
 
1462
  specifies a pointer to a parameter array that contains either a single symbolic 
 
1463
  constant or an RGBA color
 
1464
  """
 
1465
 
 
1466
def glTexGen (coord, pname, param):
 
1467
  """
 
1468
  B{glTexGend, glTexGenf, glTexGeni, glTexGendv, glTexGenfv, glTexGeniv}
 
1469
 
 
1470
  Control the generation of texture coordinates
 
1471
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texgen.html}
 
1472
  
 
1473
  @type coord: Enumerated constant
 
1474
  @param coord: Specifies a texture coordinate. 
 
1475
  @type pname: Enumerated constant
 
1476
  @param pname: Specifies the symbolic name of the texture- coordinate generation function. 
 
1477
  @type param: Depends on function prototype.
 
1478
  @param param: Specifies a single-valued texture generation parameter. 
 
1479
  If function prototype ends in 'v' specifies a pointer to an array of texture 
 
1480
  generation parameters. If pname is GL_TEXTURE_GEN_MODE, then the array must 
 
1481
  contain a single symbolic constant. Otherwise, params holds the coefficients 
 
1482
  for the texture-coordinate generation function specified by pname. 
 
1483
  """
 
1484
 
 
1485
def glTexImage1D(target, level, internalformat, width, border, format, type, pixels):
 
1486
  """
 
1487
  Specify a one-dimensional texture image
 
1488
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage1d.html}
 
1489
 
 
1490
  @type target: Enumerated constant
 
1491
  @param target: Specifies the target texture. 
 
1492
  @type level: int
 
1493
  @param level: Specifies the level-of-detail number. Level 0 is the base image level. 
 
1494
  Level n is the nth mipmap reduction image. 
 
1495
  @type internalformat: int
 
1496
  @param internalformat: Specifies the number of color components in the texture. 
 
1497
  @type width: int
 
1498
  @param width: Specifies the width of the texture image. Must be 2n+2(border) for 
 
1499
  some integer n. All implementations support texture images that are at least 64 
 
1500
  texels wide. The height of the 1D texture image is 1. 
 
1501
  @type border: int
 
1502
  @param border: Specifies the width of the border. Must be either 0 or 1. 
 
1503
  @type format: Enumerated constant
 
1504
  @param format: Specifies the format of the pixel data. 
 
1505
  @type type: Enumerated constant
 
1506
  @param type: Specifies the data type of the pixel data. 
 
1507
  @type pixels: Buffer object.
 
1508
  @param pixels: Specifies a pointer to the image data in memory. 
 
1509
  """
 
1510
 
 
1511
def glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels):
 
1512
  """
 
1513
  Specify a two-dimensional texture image
 
1514
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage2d.html}
 
1515
 
 
1516
  @type target: Enumerated constant
 
1517
  @param target: Specifies the target texture. 
 
1518
  @type level: int
 
1519
  @param level: Specifies the level-of-detail number. Level 0 is the base image level. 
 
1520
  Level n is the nth mipmap reduction image. 
 
1521
  @type internalformat: int
 
1522
  @param internalformat: Specifies the number of color components in the texture. 
 
1523
  @type width: int
 
1524
  @param width: Specifies the width of the texture image. Must be 2n+2(border) for 
 
1525
  some integer n. All implementations support texture images that are at least 64 
 
1526
  texels wide. 
 
1527
  @type height: int
 
1528
  @param height: Specifies the height of the texture image. Must be 2m+2(border) for 
 
1529
  some integer m. All implementations support texture images that are at least 64 
 
1530
  texels high. 
 
1531
  @type border: int
 
1532
  @param border: Specifies the width of the border. Must be either 0 or 1. 
 
1533
  @type format: Enumerated constant
 
1534
  @param format: Specifies the format of the pixel data. 
 
1535
  @type type: Enumerated constant
 
1536
  @param type: Specifies the data type of the pixel data. 
 
1537
  @type pixels: Buffer object.
 
1538
  @param pixels: Specifies a pointer to the image data in memory. 
 
1539
  """
 
1540
 
 
1541
def glTexParameter (target, pname, param):
 
1542
  """
 
1543
  B{glTexParameterf, glTexParameteri, glTexParameterfv, glTexParameteriv}
 
1544
 
 
1545
  Set texture parameters
 
1546
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texparameter.html}
 
1547
 
 
1548
  @type target: Enumerated constant
 
1549
  @param target: Specifies the target texture.
 
1550
  @type pname: Enumerated constant
 
1551
  @param pname: Specifies the symbolic name of a single-valued texture parameter. 
 
1552
  @type param: Depends on function prototype.
 
1553
  @param param: Specifies the value of pname. If function prototype ends in 'v' specifies 
 
1554
  a pointer to an array where the value or values of pname are stored. 
 
1555
  """
 
1556
 
 
1557
def glTranslate (x, y, z):
 
1558
  """
 
1559
  B{glTranslatef, glTranslated}
 
1560
 
 
1561
  Multiply the current matrix by a translation matrix
 
1562
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/translate.html}
 
1563
 
 
1564
  @type x, y, z: Depends on function prototype.
 
1565
  @param x, y, z: Specify the x, y, and z coordinates of a translation vector. 
 
1566
  """
 
1567
 
 
1568
def glVertex (x,y,z,w,v):
 
1569
  """
 
1570
  B{glVertex2d, glVertex2f, glVertex2i, glVertex2s, glVertex3d, glVertex3f, glVertex3i, 
 
1571
  glVertex3s, glVertex4d, glVertex4f, glVertex4i, glVertex4s, glVertex2dv, glVertex2fv, 
 
1572
  glVertex2iv, glVertex2sv, glVertex3dv, glVertex3fv, glVertex3iv, glVertex3sv, glVertex4dv, 
 
1573
  glVertex4fv, glVertex4iv, glVertex4sv}
 
1574
 
 
1575
  Specify a vertex
 
1576
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/vertex.html}
 
1577
  
 
1578
  @type x, y, z, w: Depends on function prototype (z and w for '3' and '4' prototypes only)
 
1579
  @param x, y, z, w: Specify x, y, z, and w coordinates of a vertex. Not all parameters 
 
1580
  are present in all forms of the command. 
 
1581
  @type v: Buffer object. Depends of function prototype (for 'v' prototypes only)
 
1582
  @param v: Specifies a pointer to an array of two, three, or four elements. The 
 
1583
  elements of a two-element array are x and y; of a three-element array, x, y, and z; 
 
1584
  and of a four-element array, x, y, z, and w. 
 
1585
  """
 
1586
 
 
1587
def glViewport(x,y,width,height):
 
1588
  """
 
1589
  Set the viewport
 
1590
  @see: U{www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/viewport.html}
 
1591
 
 
1592
  @type x, y: int
 
1593
  @param x, y: Specify the lower left corner of the viewport rectangle, 
 
1594
  in pixels. The initial value is (0,0). 
 
1595
  @type width, height: int
 
1596
  @param width, height: Specify the width and height of the viewport. When a GL context 
 
1597
  is first attached to a window, width and height are set to the dimensions of that window. 
 
1598
  """
 
1599
 
 
1600
def gluPerspective(fovY, aspect, zNear, zFar):
 
1601
  """
 
1602
  Set up a perspective projection matrix.
 
1603
  @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5577288}
 
1604
 
 
1605
  @type fovY: double
 
1606
  @param fovY: Specifies the field of view angle, in degrees, in the y direction.
 
1607
  @type aspect: double
 
1608
  @param aspect: Specifies the aspect ratio that determines the field of view in the x direction. 
 
1609
   The aspect ratio is the ratio of x (width) to y (height).
 
1610
  @type zNear: double
 
1611
  @param zNear: Specifies the distance from the viewer to the near clipping plane (always positive).
 
1612
  @type zFar: double
 
1613
  @param zFar: Specifies the distance from the viewer to the far clipping plane (always positive).
 
1614
  """
 
1615
 
 
1616
def gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz):
 
1617
  """
 
1618
  Define a viewing transformation
 
1619
  @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5573042}
 
1620
 
 
1621
  @type eyex, eyey, eyez: double
 
1622
  @param eyex, eyey, eyez: Specifies the position of the eye point.  
 
1623
  @type centerx, centery, centerz: double
 
1624
  @param centerx, centery, centerz: Specifies the position of the reference point.
 
1625
  @type upx, upy, upz: double
 
1626
  @param upx, upy, upz: Specifies the direction of the up vector.
 
1627
  """
 
1628
 
 
1629
def gluOrtho2D(left, right, bottom, top):
 
1630
  """
 
1631
  Define a 2-D orthographic projection matrix
 
1632
  @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5578074}
 
1633
 
 
1634
  @type left, right: double
 
1635
  @param left, right: Specify the coordinates for the left and right vertical clipping planes.
 
1636
  @type bottom, top: double
 
1637
  @param bottom, top: Specify the coordinates for the bottom and top horizontal clipping planes.
 
1638
  """
 
1639
 
 
1640
def gluPickMatrix(x, y, width, height, viewport):
 
1641
  """
 
1642
  Define a picking region
 
1643
  @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5578074}
 
1644
 
 
1645
  @type x, y: double
 
1646
  @param x, y: Specify the center of a picking region in window coordinates.
 
1647
  @type width, height: double
 
1648
  @param width, height: Specify the width and height, respectively, of the picking region in window coordinates.
 
1649
  @type viewport: Buffer object. [int]
 
1650
  @param viewport: Specifies the current viewport.
 
1651
  """
 
1652
 
 
1653
def gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, winx, winy, winz):
 
1654
  """
 
1655
  Map object coordinates to window coordinates.
 
1656
  @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5578074}
 
1657
  
 
1658
  @type objx, objy, objz: double
 
1659
  @param objx, objy, objz: Specify the object coordinates.
 
1660
  @type modelMatrix: Buffer object. [double]
 
1661
  @param modelMatrix: Specifies the current modelview matrix (as from a glGetDoublev call).
 
1662
  @type projMatrix: Buffer object. [double]
 
1663
  @param projMatrix: Specifies the current projection matrix (as from a glGetDoublev call).
 
1664
  @type viewport: Buffer object. [int]
 
1665
  @param viewport: Specifies the current viewport (as from a glGetIntegerv call).
 
1666
  @type winx, winy, winz: Buffer object. [double]
 
1667
  @param winx, winy, winz: Return the computed window coordinates. 
 
1668
  """
 
1669
 
 
1670
def gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, objx, objy, objz):
 
1671
  """
 
1672
  Map object coordinates to window
 
1673
  coordinates.
 
1674
  @see: U{http://biology.ncsa.uiuc.edu/cgi-bin/infosrch.cgi?cmd=getdoc&coll=0650&db=bks&fname=/SGI_Developer/OpenGL_RM/ch06.html#id5582204}
 
1675
 
 
1676
  @type winx, winy, winz: double
 
1677
  @param winx, winy, winz: Specify the window coordinates to be mapped.
 
1678
  @type modelMatrix: Buffer object. [double]
 
1679
  @param modelMatrix: Specifies the current modelview matrix (as from a glGetDoublev call).
 
1680
  @type projMatrix: Buffer object. [double]
 
1681
  @param projMatrix: Specifies the current projection matrix (as from a glGetDoublev call).
 
1682
  @type viewport: Buffer object. [int]
 
1683
  @param viewport: Specifies the current viewport (as from a glGetIntegerv call).
 
1684
  @type objx, objy, objz: Buffer object. [double]
 
1685
  @param objx, objy, objz: Return the computed object coordinates.
 
1686
  """
 
1687
 
 
1688
class Buffer:
 
1689
  """
 
1690
  The Buffer object is simply a block of memory that is delineated and initialized by the
 
1691
  user. Many OpenGL functions return data to a C-style pointer, however, because this
 
1692
  is not possible in python the Buffer object can be used to this end. Wherever pointer
 
1693
  notation is used in the OpenGL functions the Buffer object can be used in it's BGL 
 
1694
  wrapper. In some instances the Buffer object will need to be initialized with the template 
 
1695
  parameter, while in other instances the user will want to create just a blank buffer 
 
1696
  which will be zeroed by default.
 
1697
 
 
1698
  @ivar list: The contents of the Buffer.
 
1699
  @ivar dimensions: The size of the Buffer.
 
1700
  """
 
1701
 
 
1702
  def __init__(type, dimensions, template = None):
 
1703
    """
 
1704
    This will create a new Buffer object for use with other BGL OpenGL commands.
 
1705
    Only the type of argument to store in the buffer and the dimensions of the buffer
 
1706
    are necessary. Buffers are zeroed by default unless a template is supplied, in 
 
1707
    which case the buffer is initialized to the template.
 
1708
 
 
1709
    @type type: int
 
1710
    @param type: The format to store data in. The type should be one of 
 
1711
    GL_BYTE, GL_SHORT, GL_INT, or GL_FLOAT.
 
1712
    @type dimensions: An int or sequence object specifying the dimensions of the buffer.
 
1713
    @param dimensions: If the dimensions are specified as an int a linear array will 
 
1714
    be created for the buffer. If a sequence is passed for the dimensions, the buffer 
 
1715
    becomes n-Dimensional, where n is equal to the number of parameters passed in the 
 
1716
    sequence. Example: [256,2] is a two- dimensional buffer while [256,256,4] creates 
 
1717
    a three- dimensional buffer. You can think of each additional dimension as a sub-item 
 
1718
    of the dimension to the left. i.e. [10,2] is a 10 element array each with 2 sub-items.  
 
1719
    [(0,0), (0,1), (1,0), (1,1), (2,0), ...] etc.
 
1720
    @type template: A python sequence object (optional)
 
1721
    @param template: A sequence of matching dimensions which will be used to initialize
 
1722
    the Buffer. If a template is not passed in all fields will be initialized to 0.
 
1723
    @rtype: Buffer object
 
1724
    @return: The newly created buffer as a PyObject.
 
1725
    """