1glu(3)                     Erlang Module Definition                     glu(3)
2
3
4

NAME

6       glu -  A part of the standard OpenGL Utility api.
7

DESCRIPTION

9       A part of the standard OpenGL Utility api. See www.khronos.org
10
11       Booleans are represented by integers 0 and 1.
12

DATA TYPES

14         enum() = non_neg_integer():
15
16
17           See wx/include/gl.hrl or glu.hrl
18
19         matrix() = matrix12() | matrix16():
20
21
22         matrix12()  =  {float(), float(), float(), float(), float(), float(),
23         float(), float(), float(), float(), float(), float()}:
24
25
26         matrix16() = {float(), float(), float(), float(),  float(),  float(),
27         float(),   float(),  float(),  float(),  float(),  float(),  float(),
28         float(), float(), float()}:
29
30
31         mem() = binary() | tuple():
32
33
34           Memory block
35
36         vertex() = {float(), float(), float()}:
37
38

EXPORTS

40       tesselate(Normal, Vs::[Vs]) -> {Triangles, VertexPos}
41
42              Types:
43
44                 Normal = vertex()
45                 Vs = vertex()
46                 Triangles = [integer()]
47                 VertexPos = binary()
48
49              General purpose polygon triangulation. The first argument is the
50              normal  and the second a list of vertex positions. Returned is a
51              list of indecies of the vertices  and  a  binary  (64bit  native
52              float)  containing  an array of vertex positions, it starts with
53              the vertices in Vs and may contain newly created vertices in the
54              end.
55
56       build1DMipmapLevels(Target, InternalFormat, Width, Format, Type, Level,
57       Base, Max, Data) -> integer()
58
59              Types:
60
61                 Target = enum()
62                 InternalFormat = integer()
63                 Width = integer()
64                 Format = enum()
65                 Type = enum()
66                 Level = integer()
67                 Base = integer()
68                 Max = integer()
69                 Data = binary()
70
71              Builds a subset of one-dimensional mipmap levels
72
73              glu:build1DMipmapLevels builds  a  subset  of  prefiltered  one-
74              dimensional  texture  maps  of  decreasing  resolutions called a
75              mipmap. This is used for  the  antialiasing  of  texture  mapped
76              primitives.
77
78              See external documentation.
79
80       build1DMipmaps(Target,  InternalFormat,  Width,  Format, Type, Data) ->
81       integer()
82
83              Types:
84
85                 Target = enum()
86                 InternalFormat = integer()
87                 Width = integer()
88                 Format = enum()
89                 Type = enum()
90                 Data = binary()
91
92              Builds a one-dimensional mipmap
93
94              glu:build1DMipmaps builds a  series  of  prefiltered  one-dimen‐
95              sional  texture  maps of decreasing resolutions called a mipmap.
96              This is used for the antialiasing of texture mapped primitives.
97
98              See external documentation.
99
100       build2DMipmapLevels(Target,  InternalFormat,  Width,  Height,   Format,
101       Type, Level, Base, Max, Data) -> integer()
102
103              Types:
104
105                 Target = enum()
106                 InternalFormat = integer()
107                 Width = integer()
108                 Height = integer()
109                 Format = enum()
110                 Type = enum()
111                 Level = integer()
112                 Base = integer()
113                 Max = integer()
114                 Data = binary()
115
116              Builds a subset of two-dimensional mipmap levels
117
118              glu:build2DMipmapLevels  builds  a  subset  of  prefiltered two-
119              dimensional texture maps  of  decreasing  resolutions  called  a
120              mipmap.  This  is  used  for  the antialiasing of texture mapped
121              primitives.
122
123              See external documentation.
124
125       build2DMipmaps(Target, InternalFormat,  Width,  Height,  Format,  Type,
126       Data) -> integer()
127
128              Types:
129
130                 Target = enum()
131                 InternalFormat = integer()
132                 Width = integer()
133                 Height = integer()
134                 Format = enum()
135                 Type = enum()
136                 Data = binary()
137
138              Builds a two-dimensional mipmap
139
140              glu:build2DMipmaps  builds  a  series  of prefiltered two-dimen‐
141              sional texture maps of decreasing resolutions called  a  mipmap.
142              This is used for the antialiasing of texture-mapped primitives.
143
144              See external documentation.
145
146       build3DMipmapLevels(Target,  InternalFormat, Width, Height, Depth, For‐
147       mat, Type, Level, Base, Max, Data) -> integer()
148
149              Types:
150
151                 Target = enum()
152                 InternalFormat = integer()
153                 Width = integer()
154                 Height = integer()
155                 Depth = integer()
156                 Format = enum()
157                 Type = enum()
158                 Level = integer()
159                 Base = integer()
160                 Max = integer()
161                 Data = binary()
162
163              Builds a subset of three-dimensional mipmap levels
164
165              glu:build3DMipmapLevels builds a subset  of  prefiltered  three-
166              dimensional  texture  maps  of  decreasing  resolutions called a
167              mipmap. This is used for  the  antialiasing  of  texture  mapped
168              primitives.
169
170              See external documentation.
171
172       build3DMipmaps(Target,  InternalFormat,  Width,  Height, Depth, Format,
173       Type, Data) -> integer()
174
175              Types:
176
177                 Target = enum()
178                 InternalFormat = integer()
179                 Width = integer()
180                 Height = integer()
181                 Depth = integer()
182                 Format = enum()
183                 Type = enum()
184                 Data = binary()
185
186              Builds a three-dimensional mipmap
187
188              glu:build3DMipmaps builds a series of  prefiltered  three-dimen‐
189              sional  texture  maps of decreasing resolutions called a mipmap.
190              This is used for the antialiasing of texture-mapped primitives.
191
192              See external documentation.
193
194       checkExtension(ExtName, ExtString) -> 0 | 1
195
196              Types:
197
198                 ExtName = string()
199                 ExtString = string()
200
201              Determines if an extension name is supported
202
203              glu:checkExtension returns ?GLU_TRUE  if  ExtName  is  supported
204              otherwise ?GLU_FALSE is returned.
205
206              See external documentation.
207
208       cylinder(Quad, Base, Top, Height, Slices, Stacks) -> ok
209
210              Types:
211
212                 Quad = integer()
213                 Base = float()
214                 Top = float()
215                 Height = float()
216                 Slices = integer()
217                 Stacks = integer()
218
219              Draw a cylinder
220
221              glu:cylinder  draws  a  cylinder  oriented along the z axis. The
222              base of the cylinder is placed at z = 0 and the top at z=height.
223              Like  a  sphere, a cylinder is subdivided around the z axis into
224              slices and along the z axis into stacks.
225
226              See external documentation.
227
228       deleteQuadric(Quad) -> ok
229
230              Types:
231
232                 Quad = integer()
233
234              Destroy a quadrics object
235
236              glu:deleteQuadric destroys the  quadrics  object  (created  with
237              glu:newQuadric/0   )   and   frees  any  memory  it  uses.  Once
238              glu:deleteQuadric has been called, Quad cannot be used again.
239
240              See external documentation.
241
242       disk(Quad, Inner, Outer, Slices, Loops) -> ok
243
244              Types:
245
246                 Quad = integer()
247                 Inner = float()
248                 Outer = float()
249                 Slices = integer()
250                 Loops = integer()
251
252              Draw a disk
253
254              glu:disk renders a disk on the z =  0  plane.  The  disk  has  a
255              radius  of  Outer and contains a concentric circular hole with a
256              radius of Inner . If Inner is 0, then no hole is generated.  The
257              disk  is  subdivided  around  the z axis into slices (like pizza
258              slices) and also about the z axis into rings  (as  specified  by
259              Slices and Loops , respectively).
260
261              See external documentation.
262
263       errorString(Error) -> string()
264
265              Types:
266
267                 Error = enum()
268
269              Produce an error string from a GL or GLU error code
270
271              glu:errorString  produces an error string from a GL or GLU error
272              code. The  string  is  in  ISO  Latin  1  format.  For  example,
273              glu:errorString(?GLU_OUT_OF_MEMORY)  returns  the  string out of
274              memory.
275
276              See external documentation.
277
278       getString(Name) -> string()
279
280              Types:
281
282                 Name = enum()
283
284              Return a string describing the GLU version or GLU extensions
285
286              glu:getString returns a pointer to a  static  string  describing
287              the GLU version or the GLU extensions that are supported.
288
289              See external documentation.
290
291       lookAt(EyeX,  EyeY,  EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ) ->
292       ok
293
294              Types:
295
296                 EyeX = float()
297                 EyeY = float()
298                 EyeZ = float()
299                 CenterX = float()
300                 CenterY = float()
301                 CenterZ = float()
302                 UpX = float()
303                 UpY = float()
304                 UpZ = float()
305
306              Define a viewing transformation
307
308              glu:lookAt creates a viewing matrix derived from an eye point, a
309              reference  point  indicating  the center of the scene, and an UP
310              vector.
311
312              See external documentation.
313
314       newQuadric() -> integer()
315
316              Create a quadrics object
317
318              glu:newQuadric creates and returns a pointer to a  new  quadrics
319              object.  This  object  must be referred to when calling quadrics
320              rendering and control functions. A return value of 0 means  that
321              there is not enough memory to allocate the object.
322
323              See external documentation.
324
325       ortho2D(Left, Right, Bottom, Top) -> ok
326
327              Types:
328
329                 Left = float()
330                 Right = float()
331                 Bottom = float()
332                 Top = float()
333
334              Define a 2D orthographic projection matrix
335
336              glu:ortho2D  sets  up  a  two-dimensional  orthographic  viewing
337              region. This is equivalent to calling  gl:ortho/6  with  near=-1
338              and far=1.
339
340              See external documentation.
341
342       partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> ok
343
344              Types:
345
346                 Quad = integer()
347                 Inner = float()
348                 Outer = float()
349                 Slices = integer()
350                 Loops = integer()
351                 Start = float()
352                 Sweep = float()
353
354              Draw an arc of a disk
355
356              glu:partialDisk  renders a partial disk on the z=0 plane. A par‐
357              tial disk is similar to a full disk, except that only the subset
358              of  the disk from Start through Start + Sweep is included (where
359              0 degrees is along the +f2yf axis, 90 degrees along the +x axis,
360              180  degrees  along  the  -y  axis, and 270 degrees along the -x
361              axis).
362
363              See external documentation.
364
365       perspective(Fovy, Aspect, ZNear, ZFar) -> ok
366
367              Types:
368
369                 Fovy = float()
370                 Aspect = float()
371                 ZNear = float()
372                 ZFar = float()
373
374              Set up a perspective projection matrix
375
376              glu:perspective specifies a viewing frustum into the world coor‐
377              dinate  system.  In general, the aspect ratio in glu:perspective
378              should match the aspect ratio of the  associated  viewport.  For
379              example, aspect=2.0 means the viewer's angle of view is twice as
380              wide in x as it is in y. If the viewport is twice as wide as  it
381              is tall, it displays the image without distortion.
382
383              See external documentation.
384
385       pickMatrix(X, Y, DelX, DelY, Viewport) -> ok
386
387              Types:
388
389                 X = float()
390                 Y = float()
391                 DelX = float()
392                 DelY = float()
393                 Viewport = {integer(), integer(), integer(), integer()}
394
395              Define a picking region
396
397              glu:pickMatrix  creates  a projection matrix that can be used to
398              restrict drawing to a small region of the viewport. This is typ‐
399              ically useful to determine what objects are being drawn near the
400              cursor. Use glu:pickMatrix to restrict drawing to a small region
401              around  the  cursor. Then, enter selection mode (with gl:render‐
402              Mode/1 ) and rerender the scene. All primitives that would  have
403              been  drawn  near  the  cursor  are identified and stored in the
404              selection buffer.
405
406              See external documentation.
407
408       project(ObjX,  ObjY,  ObjZ,   Model,   Proj,   View)   ->   {integer(),
409       WinX::float(), WinY::float(), WinZ::float()}
410
411              Types:
412
413                 ObjX = float()
414                 ObjY = float()
415                 ObjZ = float()
416                 Model = matrix()
417                 Proj = matrix()
418                 View = {integer(), integer(), integer(), integer()}
419
420              Map object coordinates to window coordinates
421
422              glu:project  transforms  the  specified  object coordinates into
423              window coordinates using Model , Proj , and View . The result is
424              stored  in  WinX , WinY , and WinZ . A return value of ?GLU_TRUE
425              indicates success, a return value of ?GLU_FALSE indicates  fail‐
426              ure.
427
428              See external documentation.
429
430       quadricDrawStyle(Quad, Draw) -> ok
431
432              Types:
433
434                 Quad = integer()
435                 Draw = enum()
436
437              Specify the draw style desired for quadrics
438
439              glu:quadricDrawStyle  specifies the draw style for quadrics ren‐
440              dered with Quad . The legal values are as follows:
441
442              See external documentation.
443
444       quadricNormals(Quad, Normal) -> ok
445
446              Types:
447
448                 Quad = integer()
449                 Normal = enum()
450
451              Specify what kind of normals are desired for quadrics
452
453              glu:quadricNormals specifies what kind of  normals  are  desired
454              for  quadrics  rendered with Quad . The legal values are as fol‐
455              lows:
456
457              See external documentation.
458
459       quadricOrientation(Quad, Orientation) -> ok
460
461              Types:
462
463                 Quad = integer()
464                 Orientation = enum()
465
466              Specify inside/outside orientation for quadrics
467
468              glu:quadricOrientation specifies what  kind  of  orientation  is
469              desired for quadrics rendered with Quad . The Orientation values
470              are as follows:
471
472              See external documentation.
473
474       quadricTexture(Quad, Texture) -> ok
475
476              Types:
477
478                 Quad = integer()
479                 Texture = 0 | 1
480
481              Specify if texturing is desired for quadrics
482
483              glu:quadricTexture specifies if texture  coordinates  should  be
484              generated for quadrics rendered with Quad . If the value of Tex‐
485              ture is ?GLU_TRUE, then texture coordinates are  generated,  and
486              if  Texture  is  ?GLU_FALSE,  they are not. The initial value is
487              ?GLU_FALSE.
488
489              See external documentation.
490
491       scaleImage(Format, WIn,  HIn,  TypeIn,  DataIn,  WOut,  HOut,  TypeOut,
492       DataOut) -> integer()
493
494              Types:
495
496                 Format = enum()
497                 WIn = integer()
498                 HIn = integer()
499                 TypeIn = enum()
500                 DataIn = binary()
501                 WOut = integer()
502                 HOut = integer()
503                 TypeOut = enum()
504                 DataOut = mem()
505
506              Scale an image to an arbitrary size
507
508              glu:scaleImage  scales a pixel image using the appropriate pixel
509              store modes to unpack data from the source image and  pack  data
510              into the destination image.
511
512              See external documentation.
513
514       sphere(Quad, Radius, Slices, Stacks) -> ok
515
516              Types:
517
518                 Quad = integer()
519                 Radius = float()
520                 Slices = integer()
521                 Stacks = integer()
522
523              Draw a sphere
524
525              glu:sphere  draws  a  sphere of the given radius centered around
526              the origin. The sphere is subdivided  around  the  z  axis  into
527              slices  and  along  the  z axis into stacks (similar to lines of
528              longitude and latitude).
529
530              See external documentation.
531
532       unProject(WinX,  WinY,  WinZ,  Model,  Proj,   View)   ->   {integer(),
533       ObjX::float(), ObjY::float(), ObjZ::float()}
534
535              Types:
536
537                 WinX = float()
538                 WinY = float()
539                 WinZ = float()
540                 Model = matrix()
541                 Proj = matrix()
542                 View = {integer(), integer(), integer(), integer()}
543
544              Map window coordinates to object coordinates
545
546              glu:unProject  maps the specified window coordinates into object
547              coordinates using Model , Proj , and View . The result is stored
548              in  ObjX  ,  ObjY , and ObjZ . A return value of ?GLU_TRUE indi‐
549              cates success; a return value of ?GLU_FALSE indicates failure.
550
551              See external documentation.
552
553       unProject4(WinX, WinY, WinZ, ClipW, Model, Proj, View, NearVal, FarVal)
554       ->    {integer(),    ObjX::float(),    ObjY::float(),    ObjZ::float(),
555       ObjW::float()}
556
557              Types:
558
559                 WinX = float()
560                 WinY = float()
561                 WinZ = float()
562                 ClipW = float()
563                 Model = matrix()
564                 Proj = matrix()
565                 View = {integer(), integer(), integer(), integer()}
566                 NearVal = float()
567                 FarVal = float()
568
569              See unProject/6
570

AUTHORS

572       <>
573
574
575
576                                   wx 1.9.3                             glu(3)
Impressum