The jit.gl.render object requires a single argument -- a name that will be attached to
its OpenGL context. The OpenGL drawing can be sent to any named jit.window,
jit.pwindow or jit.matrix object.
Use the drawto destination message to change the destination on which the
drawing results will be visible.
When drawing to a jit.matrix object, the matrix must be sent to a pwindow or otherwise made visible in order
to view the drawing.
There are two ways of drawing things with jit.gl.render: creating Jitter OpenGL objects
such as the jit.gl.plato object,
and sending drawing commands directly to the jit.gl.render object. When you create new jit.gl objects, they
appear automatically in the OpenGL scene and are redrawn each time a bang is sent to the jit.gl.render object.
This provides an easy way to begin drawing 3D scenes.
When you use drawing commands directly to a jit.gl.render object,
you must create a patch which sends the desired
sequence of drawing messages for each frame. This method of drawing offers lots of flexibility.
The most commonly used drawing command is jit_matrix.
Matrices sent using this command are drawn
as 2D or 3D geometry, according to the currently set graphics primitive
or one set explicitly in the command.
Other drawing commands include draw_pixels, which draws the matrix
contents as a 2D picture, and test,
which draw standard SMPTE color bars.
OpenGL is a standard for 3D drawing based on a complex virtual machine with commands for viewing, lighting,
texturing, 2D imaging, and frame buffer control. A full discussion of OpenGL is beyond the scope of this reference.
A valuable starter reference is the OpenGL "Red Book". please see www.opengl.org for more information.
| Name |
Type |
Description |
| camera |
float list[3] |
The camera position in 3D space (default = 0. 0. 2.) Camera position is specified
as a set of floating point numbers that correspond to a camera position
with respect to the x, y, and z axes.
|
| erase_color |
float list[4] |
Color and opacity with which image is overdrawn on receipt of erase message
in the form red green blue opacity (default = 0. 0. 0. 1. (opaque black))
All values should be in the range 0.-1.
|
| far_clip |
float |
The far clipping plane distance in 3D world (default = 100.)
|
| geom_rows |
int |
Vertex connection mode (default = 0 (connect along columns))
0 = connect vertices in 2D geometry matrix along columns
1 = connect vertices in 2D geometry matrix along rows
|
| lens_angle |
float |
The lens angle of the OpenGL camera (default = 45.)
|
| light_ambient |
float list[4] |
The color and opacity of the ambient light component
in the form red green blue opacity
(default = 0. 0. 0. 1. (opaque black))
All values should be in the range 0.-1.
|
| light_diffuse |
float list[4] |
The color and opacity of the diffuse light component
in the form red green blue opacity
(default = 1. 1. 1. 1. (opaque white))
All values should be in the range 0.-1.
|
| light_global_ambient |
float list[4] |
The color and opacity of the global ambient light component
in the form red green blue opacity
(default = 0.2 0.2 0.2 1.)
All values should be in the range 0.-1.
|
| light_position |
float list[4] |
The position of the light source in XYZ coordinates and the light type (default = 1. 1. 1. 0.)
When the last number is 0., t
The light is treated as a directional source if 0. is the final number.
Otherwise, diffuse and specular lighting calculations are based on the actual
location of the light in eye coordinates, and attenuation is enabled.
|
| light_specular |
float list[4] |
Color and opacity of specular light component (default = 1. 1. 1. 1. (opaque white))
The first three floats in the range 0.-1. specify the RGB components of the specular light color.
The fourth float (also in the range 0.-1.) specifies opacity.
|
| lookat |
float list[3] |
3D position at which the camera is pointed (default = 0. 0. 0.)
|
| near_clip |
float |
The near clipping plane distance in 3D world (default = 0.1)
|
| primitive |
symbol |
The currentg drawing primitive (default = tri_grid)
|
| quality |
int |
Quality flag when using software renderer (default = 0). (Mac only) Slower than normal SW renderer, but supports
larger rendering, shaders, and other advanced features.
|
| up |
float list[3] |
The 3D vector towards which the top of the camera points (default = 0. 1. 0.)
|
| jit_matrix |
Draw the geometry specified in the matrix. The matrix can have up to 13 planes. The planes are divided into
groups representing different vector data. If enough planes are present to complete a group, that group is used
in drawing the geometry. The order of groups is: vertex(xyz), texture coordinate(st), normal(uvw), color(rgba),
and edge flag(e). Here is how matrices are interpreted according to number of planes:
2 planes: vertex(xy)
3-4 planes: vertex(xyz)
5-7 planes: vertex(xyz), texture coordinate(st)
8-11 planes: vertex(xyz), texture coordinate(st), normal(uvw)
12 planes: vertex(xyz), texture coordinate(st), normal(uvw), color(rgba)
13 planes: vertex(xyz), texture coordinate(st), normal(uvw), color(rgba), edge flag(e)
|