8.4.3. OpenGL: 3D Graphics

Author(s): Leon Bottou, Yann LeCun

This is a full interface to the industry-standard 3D graphic libraries GLUT, OpenGL and OpenGLU.

All GLUT and OpenGL/OpenGLU functions can be called from Lush, and all the predefined constants can be used (with the @ macro).

Opening and manipulating windows in which OpenGL graphics can be rendered is done through GLUT. GLUT provides function to open, close and manipulate graphic windows, as well as functions to handle events from keyboards, mice, trackballs and other devices.

no explicit documentation other than calling synopsis are provided. Developers are referred to the OpenGL manuals (available for example at http://www.opengl.org/developers/documentation/specs.html



8.4.3.0. Requirements/Installation


Lush's OpenGL interface requires three libraries: libGL, libGLU, and libglut, together with the associated header files (generally found in /usr/include/GL ). Some Linux distributions do not install all those packages by default, particularly the development packages, which contain the header files. In that case you must install them yourself (e.g. on Mandrake 8.x, you must install libMesaGL1-4.0.1-4mdk.i586.rpm, libMesaGLU1-4.0.1-4mdk.i586.rpm, libMesaGLU1-devel-4.0.1-4mdk.i586.rpm, libMesaglut3-4.0.1-4mdk.i586.rpm, and libMesaglut3-devel-4.0.1-4mdk.i586.rpm).

Upon loading opengl/glut.lsh, opengl/opengl.lsh, or opengl/openglu.lsh Lush looks for the dynamic libraries libGL.so, libGLU.so, and libglut.so and attempts to load them dynamically. Lush looks in standard locations for those libraries. (/usr/X11R6/lib, /usr/lib, and /usr/local/lib). If your system happens to have those libraries in other places, set the global variables opengl-libgl, opengl-libglu, opengl-libglut to the appropriate path(s) before loading opengl.lsh openglu.lsh, or glut.lsh, or modify packages/opengl/opengl-config.lsh to contain the appropriate configurations by default.



8.4.3.1. OpenGL demos




8.4.3.2. GLUT Interface

Author(s): Leon Bottou

Lush provides an interface to OpenGL using the glut library. See http://www.opengl.org/developers/documentation/glut/spec3/spec3.html for a documentation of Glut.

Glut provides mechanisms to open and manipulate OpenGL graphic windows, cursors, menus, and events in a portable way. Though normal Glut programming requires a call to a glutMainLoop function that takes control of the application and dispatches events, there is no need to call glutMainLoop with Lush. The Glut interface uses Lush's event polling facilities in order to organize the glut event processing.



8.4.3.2.0. GlutWindow


The following class provides an easy way to create glut windows and handle glut callbacks.



8.4.3.2.0.0. (new GlutWindow)
[CLASS]


Constructs an empty GlutWindow . You must call method create to actually create the window.



8.4.3.2.0.1. (==> glutwindow create x y w h name)
[MSG]


Creates the actual glut window associated with the object glutwindow . Arguments x , y , w , h specify the window location and size. Argument name specify the window name. Passing zero leaves the argument unspecified



8.4.3.2.0.2. (==> glutwindow set-callbacks pasvmotion)
[MSG]


Establishes the various callbacks for the Glut window glutwindow . The mouse passive motion callback is only set when boolean pasvmotion is true.



8.4.3.2.0.3. (==> glutwindow destroy)
[MSG]


Destroys the actual glut window associated with glutwindow .



8.4.3.2.0.4. (==> glutwindow glhandle ...glcallback...)
[MSG]


This function gets called whenever a callback for window glutwindow is called. The default implementation immediatly calls methods glut-reshape , glut-display or glut-overlay-display in order to benefit from Glut optimizations. All other callbacks are added to the Lush event queue.

Note: This method is not and cannot be compiled.



8.4.3.2.0.5. (==> glutwindow set-event-handler handler)
[MSG]


Sets the event handler used for adding glut events to the Lush event queue. The default event handler is the glutwindow object itself.



8.4.3.2.0.6. (==> glutwindow handle event)
[MSG]


This function is called to handle glut events posted by glhandle . Unless a different event handler is set using method set-event-handler , glut messages are processed by this function when process-pending-events is called.



8.4.3.2.0.7. (==> glutwindow glut-display)
[MSG]


Event method.

8.4.3.2.0.8. (==> glutwindow glut-reshape w h)
[MSG]


Event method.

8.4.3.2.0.9. (==> glutwindow glut-keyboard key x y)
[MSG]


Event method.

8.4.3.2.0.10. (==> glutwindow glut-mouse n state x y)
[MSG]


Event method.

8.4.3.2.0.11. (==> glutwindow glut-motion x y)
[MSG]


Event method.

8.4.3.2.0.12. (==> glutwindow glut-passive-motion x y)
[MSG]


Event method.

8.4.3.2.0.13. (==> glutwindow glut-entry state)
[MSG]


Event method.

8.4.3.2.0.14. (==> glutwindow glut-visibility state)
[MSG]


Event method.

8.4.3.2.0.15. (==> glutwindow glut-menu-state state)
[MSG]


Event method.

8.4.3.2.0.16. (==> glutwindow glut-special key x y)
[MSG]


Event method.

8.4.3.2.0.17. (==> glutwindow glut-spaceball-button btn state)
[MSG]


Event method.

8.4.3.2.0.18. (==> glutwindow glut-spaceball-motion x y z)
[MSG]


Event method.

8.4.3.2.0.19. (==> glutwindow glut-spaceball-rotate x y z)
[MSG]


Event method.

8.4.3.2.0.20. (==> glutwindow glut-button-box btn state)
[MSG]


Event method.

8.4.3.2.0.21. (==> glutwindow glut-dials dial val)
[MSG]


Event method.

8.4.3.2.0.22. (==> glutwindow glut-tablet-button btn state x y)
[MSG]


Event method.

8.4.3.2.0.23. (==> glutwindow glut-tablet-motion x y)
[MSG]


Event method.

8.4.3.2.0.24. (==> glutwindow glut-menu-status status x y)
[MSG]


Event method.

8.4.3.2.0.25. (==> glutwindow glut-overlay-display)
[MSG]


Event method.



8.4.3.2.1. Glut3 API Functions


See http://www.opengl.org/developers/documentation/glut/spec3/spec3.html for the documentation of the following functions.



8.4.3.2.1.0. (glut-init-display-mode mode)




8.4.3.2.1.1. (glut-init-window-size w h)




8.4.3.2.1.2. (glut-init-window-position x y)




8.4.3.2.1.3. (glut-create-window name)




8.4.3.2.1.4. (glut-create-sub-window win x y w h)




8.4.3.2.1.5. (glut-set-window win)




8.4.3.2.1.6. (glut-get-window)




8.4.3.2.1.7. (glut-destroy-window win)




8.4.3.2.1.8. (glut-post-redisplay)




8.4.3.2.1.9. (glut-swap-buffers)




8.4.3.2.1.10. (glut-set-window-title title)




8.4.3.2.1.11. (glut-set-icon-title title)




8.4.3.2.1.12. (glut-position-window x y)




8.4.3.2.1.13. (glut-reshape-window w h)




8.4.3.2.1.14. (glut-pop-window)




8.4.3.2.1.15. (glut-push-window)




8.4.3.2.1.16. (glut-iconify-window)




8.4.3.2.1.17. (glut-show-window)




8.4.3.2.1.18. (glut-hide-window)




8.4.3.2.1.19. (glut-full-screen)




8.4.3.2.1.20. (glut-set-cursor cursor)




8.4.3.2.1.21. (glut-establish-overlay)




8.4.3.2.1.22. (glut-remove-overlay)




8.4.3.2.1.23. (glut-use-layer layer)




8.4.3.2.1.24. (glut-post-overlay-redisplay)




8.4.3.2.1.25. (glut-show-overlay)




8.4.3.2.1.26. (glut-hide-overlay)




8.4.3.2.1.27. (glut-create-menu func)




8.4.3.2.1.28. (glut-destroy-menu menu)




8.4.3.2.1.29. (glut-get-menu)




8.4.3.2.1.30. (glut-set-menu menu)




8.4.3.2.1.31. (glut-add-menu-entry label value)




8.4.3.2.1.32. (glut-add-sub-menu label submenu)




8.4.3.2.1.33. (glut-change-to-menu-entry entry label value)




8.4.3.2.1.34. (glut-change-to-sub-menu entry label submenu)




8.4.3.2.1.35. (glut-remove-menu-item item)




8.4.3.2.1.36. (glut-attach-menu button)




8.4.3.2.1.37. (glut-detach-menu button)




8.4.3.2.1.38. (glut-display-func func)




8.4.3.2.1.39. (glut-reshape-func func)




8.4.3.2.1.40. (glut-keyboard-func func)




8.4.3.2.1.41. (glut-mouse-func func)




8.4.3.2.1.42. (glut-motion-func func)




8.4.3.2.1.43. (glut-passive-motion-func func)




8.4.3.2.1.44. (glut-entry-func func)




8.4.3.2.1.45. (glut-visibility-func func)




8.4.3.2.1.46. (glut-timer-func millis func value)




8.4.3.2.1.47. (glut-menu-state-func func)




8.4.3.2.1.48. (glut-special-func func)




8.4.3.2.1.49. (glut-spaceball-motion-func func)




8.4.3.2.1.50. (glut-spaceball-rotate-func func)




8.4.3.2.1.51. (glut-spaceball-button-func func)




8.4.3.2.1.52. (glut-button-box-func func)




8.4.3.2.1.53. (glut-dials-func func)




8.4.3.2.1.54. (glut-tablet-motion-func func)




8.4.3.2.1.55. (glut-tablet-button-func func)




8.4.3.2.1.56. (glut-menu-status-func func)




8.4.3.2.1.57. (glut-overlay-display-func func)




8.4.3.2.1.58. (glut-set-color cell r g b)




8.4.3.2.1.59. (glut-get-color cell comp)




8.4.3.2.1.60. (glut-copy-colormap win)




8.4.3.2.1.61. (glut-get type)




8.4.3.2.1.62. (glut-device-get type)




8.4.3.2.1.63. (glut-layer-get type)




8.4.3.2.1.64. (glut-extension-supported name)




8.4.3.2.1.65. (glut-get-modifiers)




8.4.3.2.1.66. (glut-bitmap-character font char)




8.4.3.2.1.67. (glut-bitmap-width font char)




8.4.3.2.1.68. (glut-stroke-character font char)




8.4.3.2.1.69. (glut-stroke-width font char)




8.4.3.2.1.70. (glut-wire-sphere radius slices stacks)




8.4.3.2.1.71. (glut-solid-sphere radius slices stacks)




8.4.3.2.1.72. (glut-wire-cone base height slices stacks)




8.4.3.2.1.73. (glut-solid-cone base height slices stacks)




8.4.3.2.1.74. (glut-wire-cube size)




8.4.3.2.1.75. (glut-solid-cube size)




8.4.3.2.1.76. (glut-wire-torus innerRadius outerRadius sides ringssize)




8.4.3.2.1.77. (glut-solid-torus innerRadius outerRadius sides ringssize)




8.4.3.2.1.78. (glut-wire-teapot size)




8.4.3.2.1.79. (glut-solid-teapot size)




8.4.3.2.1.80. (glut-wire-dodecahedron)




8.4.3.2.1.81. (glut-solid-dodecahedron)




8.4.3.2.1.82. (glut-wire-octahedron)




8.4.3.2.1.83. (glut-solid-octahedron)




8.4.3.2.1.84. (glut-wire-tetrahedron)




8.4.3.2.1.85. (glut-solid-tetrahedron)




8.4.3.2.1.86. (glut-wire-icosahedron)




8.4.3.2.1.87. (glut-solid-icosahedron)




8.4.3.3. OpenGL low-level interface

Author(s): Yann LeCun

All OpenGL functions can be called from Lush, and all the predefined constants can be used (with the @ macro).

The Lush equivalents to OpenGL functions have the same name as their C counterparts. The arguments are also identical to the C version, except that structure pointers are generic pointers, and pointers to arrays of numbers are transformed into Lush matrices with the corresponding type. So for example, the Lush version of the function glPixelMapfv whose C prototype is glPixelMapfv(int,int,float*) takes two ints and an idx1 of floats as arguments.

The only exception to this rule is when the type of the numbers in the array is unspecified at compile time. In this case, the Lush function takes a gptr (the C function takes a void*). The functions to which this exception applies are: glPolygonStipple, glGetPolygonStipple, glEdgeFlagv, glReadPixels, glDrawPixels, glTexImage1D, glTexImage2D, and glGetTexImage.

The functions implemented here are the ones that are present in the gl.h file distributed with the open source implementation of OpenGL called Mesa.



8.4.3.3.0. (glClearIndex c )




8.4.3.3.1. (glClearColor (red green blue alpha)




8.4.3.3.2. (glClearColor red green blue alpha)




8.4.3.3.3. (glClear mask)




8.4.3.3.4. (glIndexMask mask)




8.4.3.3.5. (glColorMask red green blue alpha)




8.4.3.3.6. (glAlphaFunc func ref)




8.4.3.3.7. (glBlendFunc sfactor dfactor)




8.4.3.3.8. (glLogicOp opcode)




8.4.3.3.9. (glCullFace mode)




8.4.3.3.10. (glFrontFace mode)




8.4.3.3.11. (glPointSize size)




8.4.3.3.12. (glLineWidth width)




8.4.3.3.13. (glLineStipple factor pattern)




8.4.3.3.14. (glPolygonMode face mode)




8.4.3.3.15. (glPolygonStipple mask)




8.4.3.3.16. (glGetPolygonStipple mask)




8.4.3.3.17. (glEdgeFlag flag)




8.4.3.3.18. (glEdgeFlagv flag)




8.4.3.3.19. (glScissor x y width height)




8.4.3.3.20. (glClipPlane plane equation)




8.4.3.3.21. (glGetClipPlane plane equation)




8.4.3.3.22. (glDrawBuffer mode)




8.4.3.3.23. (glReadBuffer mode)




8.4.3.3.24. (glEnable cap)




8.4.3.3.25. (glDisable cap)




8.4.3.3.26. (glIsEnabled cap)




8.4.3.3.27. (glGetBooleanv pname params)




8.4.3.3.28. (glGetDoublev pname params)




8.4.3.3.29. (glGetFloatv pname params)




8.4.3.3.30. (glGetIntegerv pname params)




8.4.3.3.31. (glPushAttrib mask)




8.4.3.3.32. (glPopAttrib)




8.4.3.3.33. (glRenderMode mode)




8.4.3.3.34. (glGetError)




8.4.3.3.35. (glGetString name)




8.4.3.3.36. (glFinish)




8.4.3.3.37. (glFlush)




8.4.3.3.38. (glHint target mode)




8.4.3.3.39. (glClearDepth depth)




8.4.3.3.40. (glDepthFunc func)




8.4.3.3.41. (glDepthMask flag)




8.4.3.3.42. (glDepthRange near_val far_val)




8.4.3.3.43. (glClearAccum red green blue alpha)




8.4.3.3.44. (glAccum op value)




8.4.3.3.45. (glMatrixMode mode)




8.4.3.3.46. (glOrtho left right bottom top near_val far_val)




8.4.3.3.47. (glFrustum left right bottom top near_val far_val)




8.4.3.3.48. (glViewport x y width height)




8.4.3.3.49. (glPushMatrix)




8.4.3.3.50. (glPopMatrix)




8.4.3.3.51. (glLoadIdentity)




8.4.3.3.52. (glLoadMatrixd m)




8.4.3.3.53. (glLoadMatrixf m)




8.4.3.3.54. (glMultMatrixd m)




8.4.3.3.55. (glMultMatrixf m)




8.4.3.3.56. (glRotated angle x y z)




8.4.3.3.57. (glRotatef angle x y z)




8.4.3.3.58. (glScaled x y z)




8.4.3.3.59. (glScalef x y z)




8.4.3.3.60. (glTranslated x y z)




8.4.3.3.61. (glTranslatef x y z)




8.4.3.3.62. (glIsList list)




8.4.3.3.63. (glDeleteLists list range)




8.4.3.3.64. (glGenLists range)




8.4.3.3.65. (glNewList list mode)




8.4.3.3.66. (glEndList)




8.4.3.3.67. (glCallList list)




8.4.3.3.68. (glCallLists n type lists)




8.4.3.3.69. (glListBase base)




8.4.3.3.70. (glBegin mode)




8.4.3.3.71. (glEnd)




8.4.3.3.72. (glVertex2d x y)




8.4.3.3.73. (glVertex2f x y)




8.4.3.3.74. (glVertex2i x y)




8.4.3.3.75. (glVertex2s x y)




8.4.3.3.76. (glVertex3d x y z)




8.4.3.3.77. (glVertex3f x y z)




8.4.3.3.78. (glVertex3i x y z)




8.4.3.3.79. (glVertex3s x y z)




8.4.3.3.80. (glVertex4d x y z w)




8.4.3.3.81. (glVertex4f x y z w)




8.4.3.3.82. (glVertex4i x y z w)




8.4.3.3.83. (glVertex4s x y z w)




8.4.3.3.84. (glVertex2dv v);




8.4.3.3.85. (glVertex2fv v);




8.4.3.3.86. (glVertex2iv v);




8.4.3.3.87. (glVertex2sv v);




8.4.3.3.88. (glVertex3dv v);




8.4.3.3.89. (glVertex3fv v);




8.4.3.3.90. (glVertex3iv v);




8.4.3.3.91. (glVertex3sv v);




8.4.3.3.92. (glVertex4dv v);




8.4.3.3.93. (glVertex4fv v);




8.4.3.3.94. (glVertex4iv v);




8.4.3.3.95. (glVertex4sv v);




8.4.3.3.96. (glNormal3b nx ny nz)




8.4.3.3.97. (glNormal3d nx ny nz)




8.4.3.3.98. (glNormal3f nx ny nz)




8.4.3.3.99. (glNormal3i nx ny nz)




8.4.3.3.100. (glNormal3s nx ny nz)




8.4.3.3.101. (glNormal3bv v)




8.4.3.3.102. (glNormal3dv v)




8.4.3.3.103. (glNormal3fv v)




8.4.3.3.104. (glNormal3iv v)




8.4.3.3.105. (glNormal3sv v)




8.4.3.3.106. (glIndexd c)




8.4.3.3.107. (glIndexf c)




8.4.3.3.108. (glIndexi c)




8.4.3.3.109. (glIndexs c)




8.4.3.3.110. (glIndexdv c)




8.4.3.3.111. (glIndexfv c)




8.4.3.3.112. (glIndexiv c)




8.4.3.3.113. (glIndexsv c)




8.4.3.3.114. (glColor3b red green blue)




8.4.3.3.115. (glColor3d red green blue)




8.4.3.3.116. (glColor3f red green blue)




8.4.3.3.117. (glColor3i red green blue)




8.4.3.3.118. (glColor3s red green blue)




8.4.3.3.119. (glColor3ub red green blue)




8.4.3.3.120. (glColor3ui red green blue)




8.4.3.3.121. (glColor3us red green blue)




8.4.3.3.122. (glColor4b red green blue alpha)




8.4.3.3.123. (glColor4d red green blue alpha)




8.4.3.3.124. (glColor4f red green blue alpha)




8.4.3.3.125. (glColor4i red green blue alpha)




8.4.3.3.126. (glColor4s red green blue alpha)




8.4.3.3.127. (glColor4ub red green blue alpha)




8.4.3.3.128. (glColor4ui red green blue alpha)




8.4.3.3.129. (glColor4us red green blue alpha)




8.4.3.3.130. (glColor3bv v)




8.4.3.3.131. (glColor3dv v)




8.4.3.3.132. (glColor3fv v)




8.4.3.3.133. (glColor3iv v)




8.4.3.3.134. (glColor3sv v)




8.4.3.3.135. (glColor3ubv v)




8.4.3.3.136. (glColor3uiv v)




8.4.3.3.137. (glColor3usv v)




8.4.3.3.138. (glColor4bv v)




8.4.3.3.139. (glColor4dv v)




8.4.3.3.140. (glColor4fv v)




8.4.3.3.141. (glColor4iv v)




8.4.3.3.142. (glColor4sv v)




8.4.3.3.143. (glColor4ubv v)




8.4.3.3.144. (glColor4uiv v)




8.4.3.3.145. (glColor4usv v)




8.4.3.3.146. (glTexCoord1d s)




8.4.3.3.147. (glTexCoord1f s)




8.4.3.3.148. (glTexCoord1i s)




8.4.3.3.149. (glTexCoord1s s)




8.4.3.3.150. (glTexCoord2d s u)




8.4.3.3.151. (glTexCoord2f s u)




8.4.3.3.152. (glTexCoord2i s u)




8.4.3.3.153. (glTexCoord2s s u)




8.4.3.3.154. (glTexCoord3d s u r)




8.4.3.3.155. (glTexCoord3f s u r)




8.4.3.3.156. (glTexCoord3i s u r)




8.4.3.3.157. (glTexCoord3s s u r)




8.4.3.3.158. (glTexCoord4d s u r q)




8.4.3.3.159. (glTexCoord4f s u r q)




8.4.3.3.160. (glTexCoord4i s u r q)




8.4.3.3.161. (glTexCoord4s s u r q)




8.4.3.3.162. (glTexCoord1dv v)




8.4.3.3.163. (glTexCoord1fv v)




8.4.3.3.164. (glTexCoord1iv v)




8.4.3.3.165. (glTexCoord1sv v)




8.4.3.3.166. (glTexCoord2dv v)




8.4.3.3.167. (glTexCoord2fv v)




8.4.3.3.168. (glTexCoord2iv v)




8.4.3.3.169. (glTexCoord2sv v)




8.4.3.3.170. (glTexCoord3dv v)




8.4.3.3.171. (glTexCoord3fv v)




8.4.3.3.172. (glTexCoord3iv v)




8.4.3.3.173. (glTexCoord3sv v)




8.4.3.3.174. (glTexCoord4dv v)




8.4.3.3.175. (glTexCoord4fv v)




8.4.3.3.176. (glTexCoord4iv v)




8.4.3.3.177. (glTexCoord4sv v)




8.4.3.3.178. (glRasterPos2d x y)




8.4.3.3.179. (glRasterPos2f x y)




8.4.3.3.180. (glRasterPos2i x y)




8.4.3.3.181. (glRasterPos2s x y)




8.4.3.3.182. (glRasterPos3d x y z)




8.4.3.3.183. (glRasterPos3f x y z)




8.4.3.3.184. (glRasterPos3i x y z)




8.4.3.3.185. (glRasterPos3s x y z)




8.4.3.3.186. (glRasterPos4d x y z w)




8.4.3.3.187. (glRasterPos4f x y z w)




8.4.3.3.188. (glRasterPos4i x y z w)




8.4.3.3.189. (glRasterPos4s x y z w)




8.4.3.3.190. (glRasterPos2dv v)




8.4.3.3.191. (glRasterPos2fv v)




8.4.3.3.192. (glRasterPos2iv v)




8.4.3.3.193. (glRasterPos2sv v)




8.4.3.3.194. (glRasterPos3dv v)




8.4.3.3.195. (glRasterPos3fv v)




8.4.3.3.196. (glRasterPos3iv v)




8.4.3.3.197. (glRasterPos3sv v)




8.4.3.3.198. (glRasterPos4dv v)




8.4.3.3.199. (glRasterPos4fv v)




8.4.3.3.200. (glRasterPos4iv v)




8.4.3.3.201. (glRasterPos4sv v)




8.4.3.3.202. (glRectd x1 y1 x2 y2)




8.4.3.3.203. (glRectf x1 y1 x2 y2)




8.4.3.3.204. (glRecti x1 y1 x2 y2)




8.4.3.3.205. (glRects x1 y1 x2 y2)




8.4.3.3.206. (glRectdv v1 v2)




8.4.3.3.207. (glRectfv v1 v2)




8.4.3.3.208. (glRectiv v1 v2)




8.4.3.3.209. (glRectsv v1 v2)




8.4.3.3.210. (glShadeModel mode)




8.4.3.3.211. (glLightf light pname param)




8.4.3.3.212. (glLighti light pname param)




8.4.3.3.213. (glLightfv light pname param)




8.4.3.3.214. (glLightiv light pname param)




8.4.3.3.215. (glGetLightfv light pname param)




8.4.3.3.216. (glGetLightiv light pname param)




8.4.3.3.217. (glLightModelf pname param)




8.4.3.3.218. (glLightModeli pname param)




8.4.3.3.219. (glLightModelfv pname param)




8.4.3.3.220. (glLightModeliv pname param)




8.4.3.3.221. (glMaterialf face pname param)




8.4.3.3.222. (glMateriali face pname param)




8.4.3.3.223. (glMaterialfv face pname param)




8.4.3.3.224. (glMaterialiv face pname param)




8.4.3.3.225. (glGetMaterialfv face pname param)




8.4.3.3.226. (glGetMaterialiv face pname param)




8.4.3.3.227. (glColorMaterial face mode)




8.4.3.3.228. (glPixelZoom xfactor yfactor)




8.4.3.3.229. (glPixelStoref pname param)




8.4.3.3.230. (glPixelStorei pname param)




8.4.3.3.231. (glPixelTransferf pname param)




8.4.3.3.232. (glPixelTransferi pname param)




8.4.3.3.233. (glPixelMapfv map mapsize values)




8.4.3.3.234. (glPixelMapuiv map mapsize values)




8.4.3.3.235. (glPixelMapusv map mapsize values)




8.4.3.3.236. (glGetPixelMapfv map values)




8.4.3.3.237. (glGetPixelMapuiv map values)




8.4.3.3.238. (glGetPixelMapusv map values)




8.4.3.3.239. (glBitmap width height xorig yorig xmove ymove bitmap)




8.4.3.3.240. (glReadPixels x y width height format type pixels)




8.4.3.3.241. (glDrawPixels width height format type pixels)




8.4.3.3.242. (glCopyPixels x y width height type)




8.4.3.3.243. (glStencilFunc func ref mask)




8.4.3.3.244. (glStencilMask mask)




8.4.3.3.245. (glStencilOp fail zfail zpass)




8.4.3.3.246. (glClearStencil s)




8.4.3.3.247. (glTexGend coord pname param)




8.4.3.3.248. (glTexGenf coord pname param)




8.4.3.3.249. (glTexGeni coord pname param)




8.4.3.3.250. (glTexGendv coord pname param)




8.4.3.3.251. (glTexGenfv coord pname param)




8.4.3.3.252. (glTexGeniv coord pname param)




8.4.3.3.253. (glGetTexGendv coord pname param)




8.4.3.3.254. (glGetTexGenfv coord pname param)




8.4.3.3.255. (glGetTexGeniv coord pname param)




8.4.3.3.256. (glTexEnvf target pname param)




8.4.3.3.257. (glTexEnvi target pname param)




8.4.3.3.258. (glTexEnvfv target pname param)




8.4.3.3.259. (glTexEnviv target pname param)




8.4.3.3.260. (glGetTexEnvfv target pname param)




8.4.3.3.261. (glGetTexEnviv target pname param)




8.4.3.3.262. (glTexParameterf target pname param)




8.4.3.3.263. (glTexParameteri target pname param)




8.4.3.3.264. (glTexParameterfv target pname param)




8.4.3.3.265. (glTexParameteriv target pname param)




8.4.3.3.266. (glGetTexParameterfv target pname param)




8.4.3.3.267. (glGetTexParameteriv target pname param)




8.4.3.3.268. (glGetTexLevelParameterfv target level pname params)




8.4.3.3.269. (glGetTexLevelParameteriv target level pname params)




8.4.3.3.270. (glTexImage1D target level components width border format type pixels)




8.4.3.3.271. (glTexImage2D target level components width height border format type pixels)




8.4.3.3.272. (glGetTexImage target level format type pixels)




8.4.3.3.273. (glMap1d target u1 u2 stride order points)




8.4.3.3.274. (glMap1f target u1 u2 stride order points)




8.4.3.3.275. (glMap2d target u1 u2 ustride uorder v1 v2 vstride vorder points)




8.4.3.3.276. (glMap2f target u1 u2 ustride uorder v1 v2 vstride vorder points)




8.4.3.3.277. (glGetMapdv target query v)




8.4.3.3.278. (glGetMapfv target query v)




8.4.3.3.279. (glGetMapiv target query v)




8.4.3.3.280. (glEvalCoord1d u)




8.4.3.3.281. (glEvalCoord1f u)




8.4.3.3.282. (glEvalCoord1dv u)




8.4.3.3.283. (glEvalCoord1fv u)




8.4.3.3.284. (glEvalCoord2d u v)




8.4.3.3.285. (glEvalCoord2f u v)




8.4.3.3.286. (glEvalCoord2dv u)




8.4.3.3.287. (glEvalCoord2fv u)




8.4.3.3.288. (glMapGrid1d un u1 u2)




8.4.3.3.289. (glMapGrid1f un u1 u2)




8.4.3.3.290. (glMapGrid2d un u1 u2 vn v1 v2)




8.4.3.3.291. (glMapGrid2f un u1 u2 vn v1 v2)




8.4.3.3.292. (glEvalPoint1 i)




8.4.3.3.293. (glEvalPoint2 i j)




8.4.3.3.294. (glEvalMesh1 mode i1 i2)




8.4.3.3.295. (glEvalMesh2 mode i1 i2 j1 j2)




8.4.3.3.296. (glFogf pname param)




8.4.3.3.297. (glFogi pname param)




8.4.3.3.298. (glFogfv pname param)




8.4.3.3.299. (glFogiv pname param)




8.4.3.3.300. (glFeedbackBuffer size type buffer)




8.4.3.3.301. (glPassThrough token)




8.4.3.3.302. (glSelectBuffer size buffer)




8.4.3.3.303. (glInitNames)




8.4.3.3.304. (glLoadName name)




8.4.3.3.305. (glPushName name)




8.4.3.3.306. (glPopName)




8.4.3.3.307. (glBlendEquationEXT mode)




8.4.3.3.308. (glBlendColorEXT red green blue alpha)




8.4.3.3.309. (glPolygonOffsetEXT factor bias)




8.4.3.4. OpenGLU low-level interface

Author(s): Yann LeCun

This is a complete interface between Lush and the OpenGLU library (OpenGL Utilities). openglu uses the Lush opengl interface opengl/opengl.lsh . The Lush equivalents to OpenGLU functions have the same name as their C counterparts. The arguments are also identical to the C version, except that structure pointers are generic pointers, and pointers to arrays of numbers are transformed into Lush matrices with the corresponding type. So for example, the Lush version of the function gluGetNurbsProperty whose C prototype is gluGetNurbsProperty(GLUnurbs*,int,float*) takes a gptr, an int, and an idx1 of floats. The only exception to this rule is when the type of the numbers in the array is unspecified at compile time. In this case, the Lush function takes a gptr (the C function takes a void*). The functions to which this exception applies are: gluBuild1DMipmaps, gluBuild2DMipmaps, gluScaleImage, gluTessBeginPolygon, and gluTessVertex.

The functions implemented here are the ones that are present in the glu.h file distributed with the public domain implementation of OpenGL called Mesa.



8.4.3.4.0. (gluBeginCurve nurb)




8.4.3.4.1. (gluBeginPolygon tess)




8.4.3.4.2. (gluBeginSurface nurb)




8.4.3.4.3. (gluBeginTrim nurb)




8.4.3.4.4. (gluBuild1DMipmaps target component width format type data)




8.4.3.4.5. (gluBuild2DMipmaps target component width height format type data)




8.4.3.4.6. (gluCylinder quad base top height slices stacks)




8.4.3.4.7. (gluDeleteNurbsRenderer nurb)




8.4.3.4.8. (gluDeleteQuadric quad)




8.4.3.4.9. (gluDeleteTess tess)




8.4.3.4.10. (gluDisk quad inner outer slices loops)




8.4.3.4.11. (gluEndCurve nurb)




8.4.3.4.12. (gluEndPolygon tess)




8.4.3.4.13. (gluEndSurface nurb)




8.4.3.4.14. (gluEndTrim nurb)




8.4.3.4.15. (gluErrorString error)




8.4.3.4.16. (gluGetNurbsProperty nurb property data)




8.4.3.4.17. (gluGetString name)




8.4.3.4.18. (gluGetTessProperty tess which data)




8.4.3.4.19. (gluLoadSamplingMatrices nurb model perspective view)




8.4.3.4.20. (gluLookAt eyex eyey eyez centerx centery centerz upx upy upz)




8.4.3.4.21. (gluNewNurbsRenderer)




8.4.3.4.22. (gluNewQuadric)




8.4.3.4.23. (gluNewTess)




8.4.3.4.24. (gluNextContour tess type)




8.4.3.4.25. (gluNurbsCallback nurb which callbackfunc)




8.4.3.4.26. (gluNurbsCurve nurb knotcount knots stride control order type)




8.4.3.4.27. (gluNurbsProperty nurb property value)




8.4.3.4.28. (gluNurbsSurface nurb sknotcount sknots tknotcount tknots sstride tstride control sorder torder type)




8.4.3.4.29. (gluOrtho2D left right bottom top)




8.4.3.4.30. (gluPartialDisk quad inner outer slices loops start sweep)




8.4.3.4.31. (gluPerspective fovy aspect znear zfar)




8.4.3.4.32. (gluPickMatrix x y delx dely viewport)




8.4.3.4.33. (gluProject objx objy objz model proj view winx winy winz)




8.4.3.4.34. (gluPwlCurve nurb count data stride type)




8.4.3.4.35. (gluQuadricCallback quad which callbackfunc)




8.4.3.4.36. (gluQuadricDrawStyle quad draw)




8.4.3.4.37. (gluQuadricNormals quad normal)




8.4.3.4.38. (gluQuadricOrientation quad orientation)




8.4.3.4.39. (gluQuadricTexture quad texture)




8.4.3.4.40. (gluScaleImage format win hin typein datain wout hout typeout dataout)




8.4.3.4.41. (gluSphere quad radius slices stacks)




8.4.3.4.42. (gluTessBeginContour tess)




8.4.3.4.43. (gluTessBeginPolygon tess data)




8.4.3.4.44. (gluTessCallback tess which callbackfunc)




8.4.3.4.45. (gluTessEndContour tess)




8.4.3.4.46. (gluTessEndPolygon tess)




8.4.3.4.47. (gluTessNormal tess valuex valuey valuez)




8.4.3.4.48. (gluTessProperty tess which data)




8.4.3.4.49. (gluTessVertex tess location data)




8.4.3.4.50. (gluUnProject winx winy winz model proj view objx objy objz)