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-di‐
74              mensional  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-di‐
119              mensional  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-di‐
166              mensional  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  ra‐
255              dius of Outer and contains a concentric circular hole with a ra‐
256              dius 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,  glu:er‐
273              rorString(?GLU_OUT_OF_MEMORY) returns the string out of memory.
274
275              See external documentation.
276
277       getString(Name) -> string()
278
279              Types:
280
281                 Name = enum()
282
283              Return a string describing the GLU version or GLU extensions
284
285              glu:getString  returns  a  pointer to a static string describing
286              the GLU version or the GLU extensions that are supported.
287
288              See external documentation.
289
290       lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY,  UpZ)  ->
291       ok
292
293              Types:
294
295                 EyeX = float()
296                 EyeY = float()
297                 EyeZ = float()
298                 CenterX = float()
299                 CenterY = float()
300                 CenterZ = float()
301                 UpX = float()
302                 UpY = float()
303                 UpZ = float()
304
305              Define a viewing transformation
306
307              glu:lookAt creates a viewing matrix derived from an eye point, a
308              reference point indicating the center of the scene,  and  an  UP
309              vector.
310
311              See external documentation.
312
313       newQuadric() -> integer()
314
315              Create a quadrics object
316
317              glu:newQuadric  creates  and returns a pointer to a new quadrics
318              object. This object must be referred to  when  calling  quadrics
319              rendering  and control functions. A return value of 0 means that
320              there is not enough memory to allocate the object.
321
322              See external documentation.
323
324       ortho2D(Left, Right, Bottom, Top) -> ok
325
326              Types:
327
328                 Left = float()
329                 Right = float()
330                 Bottom = float()
331                 Top = float()
332
333              Define a 2D orthographic projection matrix
334
335              glu:ortho2D sets up a two-dimensional orthographic  viewing  re‐
336              gion.  This is equivalent to calling gl:ortho/6 with near=-1 and
337              far=1.
338
339              See external documentation.
340
341       partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> ok
342
343              Types:
344
345                 Quad = integer()
346                 Inner = float()
347                 Outer = float()
348                 Slices = integer()
349                 Loops = integer()
350                 Start = float()
351                 Sweep = float()
352
353              Draw an arc of a disk
354
355              glu:partialDisk renders a partial disk on the z=0 plane. A  par‐
356              tial disk is similar to a full disk, except that only the subset
357              of the disk from Start through Start + Sweep is included  (where
358              0 degrees is along the +f2yf axis, 90 degrees along the +x axis,
359              180 degrees along the -y axis, and  270  degrees  along  the  -x
360              axis).
361
362              See external documentation.
363
364       perspective(Fovy, Aspect, ZNear, ZFar) -> ok
365
366              Types:
367
368                 Fovy = float()
369                 Aspect = float()
370                 ZNear = float()
371                 ZFar = float()
372
373              Set up a perspective projection matrix
374
375              glu:perspective specifies a viewing frustum into the world coor‐
376              dinate system. In general, the aspect ratio  in  glu:perspective
377              should  match  the  aspect ratio of the associated viewport. For
378              example, aspect=2.0 means the viewer's angle of view is twice as
379              wide  in x as it is in y. If the viewport is twice as wide as it
380              is tall, it displays the image without distortion.
381
382              See external documentation.
383
384       pickMatrix(X, Y, DelX, DelY, Viewport) -> ok
385
386              Types:
387
388                 X = float()
389                 Y = float()
390                 DelX = float()
391                 DelY = float()
392                 Viewport = {integer(), integer(), integer(), integer()}
393
394              Define a picking region
395
396              glu:pickMatrix creates a projection matrix that can be  used  to
397              restrict drawing to a small region of the viewport. This is typ‐
398              ically useful to determine what objects are being drawn near the
399              cursor. Use glu:pickMatrix to restrict drawing to a small region
400              around the cursor. Then, enter selection mode  (with  gl:render‐
401              Mode/1  ) and rerender the scene. All primitives that would have
402              been drawn near the cursor are identified and stored in the  se‐
403              lection buffer.
404
405              See external documentation.
406
407       project(ObjX,   ObjY,   ObjZ,   Model,   Proj,   View)  ->  {integer(),
408       WinX::float(), WinY::float(), WinZ::float()}
409
410              Types:
411
412                 ObjX = float()
413                 ObjY = float()
414                 ObjZ = float()
415                 Model = matrix()
416                 Proj = matrix()
417                 View = {integer(), integer(), integer(), integer()}
418
419              Map object coordinates to window coordinates
420
421              glu:project transforms the  specified  object  coordinates  into
422              window coordinates using Model , Proj , and View . The result is
423              stored in WinX , WinY , and WinZ . A return value  of  ?GLU_TRUE
424              indicates  success, a return value of ?GLU_FALSE indicates fail‐
425              ure.
426
427              See external documentation.
428
429       quadricDrawStyle(Quad, Draw) -> ok
430
431              Types:
432
433                 Quad = integer()
434                 Draw = enum()
435
436              Specify the draw style desired for quadrics
437
438              glu:quadricDrawStyle specifies the draw style for quadrics  ren‐
439              dered with Quad . The legal values are as follows:
440
441              See external documentation.
442
443       quadricNormals(Quad, Normal) -> ok
444
445              Types:
446
447                 Quad = integer()
448                 Normal = enum()
449
450              Specify what kind of normals are desired for quadrics
451
452              glu:quadricNormals  specifies  what  kind of normals are desired
453              for quadrics rendered with Quad . The legal values are  as  fol‐
454              lows:
455
456              See external documentation.
457
458       quadricOrientation(Quad, Orientation) -> ok
459
460              Types:
461
462                 Quad = integer()
463                 Orientation = enum()
464
465              Specify inside/outside orientation for quadrics
466
467              glu:quadricOrientation specifies what kind of orientation is de‐
468              sired for quadrics rendered with Quad . The  Orientation  values
469              are as follows:
470
471              See external documentation.
472
473       quadricTexture(Quad, Texture) -> ok
474
475              Types:
476
477                 Quad = integer()
478                 Texture = 0 | 1
479
480              Specify if texturing is desired for quadrics
481
482              glu:quadricTexture  specifies  if  texture coordinates should be
483              generated for quadrics rendered with Quad . If the value of Tex‐
484              ture  is  ?GLU_TRUE, then texture coordinates are generated, and
485              if Texture is ?GLU_FALSE, they are not.  The  initial  value  is
486              ?GLU_FALSE.
487
488              See external documentation.
489
490       scaleImage(Format,  WIn,  HIn,  TypeIn,  DataIn,  WOut,  HOut, TypeOut,
491       DataOut) -> integer()
492
493              Types:
494
495                 Format = enum()
496                 WIn = integer()
497                 HIn = integer()
498                 TypeIn = enum()
499                 DataIn = binary()
500                 WOut = integer()
501                 HOut = integer()
502                 TypeOut = enum()
503                 DataOut = mem()
504
505              Scale an image to an arbitrary size
506
507              glu:scaleImage scales a pixel image using the appropriate  pixel
508              store  modes  to unpack data from the source image and pack data
509              into the destination image.
510
511              See external documentation.
512
513       sphere(Quad, Radius, Slices, Stacks) -> ok
514
515              Types:
516
517                 Quad = integer()
518                 Radius = float()
519                 Slices = integer()
520                 Stacks = integer()
521
522              Draw a sphere
523
524              glu:sphere draws a sphere of the given  radius  centered  around
525              the  origin.  The  sphere  is  subdivided around the z axis into
526              slices and along the z axis into stacks  (similar  to  lines  of
527              longitude and latitude).
528
529              See external documentation.
530
531       unProject(WinX,   WinY,   WinZ,   Model,  Proj,  View)  ->  {integer(),
532       ObjX::float(), ObjY::float(), ObjZ::float()}
533
534              Types:
535
536                 WinX = float()
537                 WinY = float()
538                 WinZ = float()
539                 Model = matrix()
540                 Proj = matrix()
541                 View = {integer(), integer(), integer(), integer()}
542
543              Map window coordinates to object coordinates
544
545              glu:unProject maps the specified window coordinates into  object
546              coordinates using Model , Proj , and View . The result is stored
547              in ObjX , ObjY , and ObjZ . A return value  of  ?GLU_TRUE  indi‐
548              cates success; a return value of ?GLU_FALSE indicates failure.
549
550              See external documentation.
551
552       unProject4(WinX, WinY, WinZ, ClipW, Model, Proj, View, NearVal, FarVal)
553       ->    {integer(),    ObjX::float(),    ObjY::float(),    ObjZ::float(),
554       ObjW::float()}
555
556              Types:
557
558                 WinX = float()
559                 WinY = float()
560                 WinZ = float()
561                 ClipW = float()
562                 Model = matrix()
563                 Proj = matrix()
564                 View = {integer(), integer(), integer(), integer()}
565                 NearVal = float()
566                 FarVal = float()
567
568              See unProject/6
569

AUTHORS

571       <>
572
573
574
575                                  wx 1.9.3.1                            glu(3)
Impressum