jit.gl.lua OpenGL GLU Bindings
The GLU (openGL Utility) bindings are located in the
module. It is a sub-module of module. To access them, use Lua's built-in function as follows:local glu = require("opengl.glu")
For the standard OpenGL bindings, see the jit.gl.lua OpenGL Bindings.
LookAt(eye, center, up)
Define a viewing transformation
OpenGL Documentation: gluLookAt
If LookAt has nine arguments, it expects unpacked vectors. Otherwise, it will look for 3 vectors as arguments.
- Specifies the position of the eye point.
- Specifies the position of the reference point.
- Specifies the direction of the up vector.
Ortho2D(left, right, bottom, up)
Define a 2D orthographic projection matrix
OpenGL Documentation: gluOrtho2D
- Specify the coordinates for the left vertical clipping planes.
- Specify the coordinates for the right vertical clipping planes.
- Specify the coordinates for the bottom horizontal clipping planes.
- Specify the coordinates for the up horizontal clipping planes.
Perspective(fovy, aspect, near, far)
Set up a perspective projection matrix
OpenGL Documentation: gluPerspective
- Specifies the field of view angle, in degrees, in the y direction.
- Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
- Specifies the distance from the viewer to the near clipping plane (always positive).
- Specifies the distance from the viewer to the far clipping plane (always positive).
Project(...)
Map object coordinates to window coordinates
OpenGL Documentation: gluProject
- Specify the object coordinates as either a table or unpacked values.
UnProject(...)
Map window coordinates to object coordinates
OpenGL Documentation: gluUnProject
- Specify the window coordinates as either a table or unpacked values.
See Also
Name | Description |
---|---|
Working with OpenGL | Working with OpenGL |
Lua in Max | Lua in Max |