![]() |
| jit.gl.sketch | GL parallel to lcd |
The jit.gl.sketch object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it. This value may also be set via the OB3D drawto attribute.
| GL Group |
| Attributes: |
| Name | Type | Description |
| autonormal | int | Automatically generate normals for tri and quad primitives (default = 0) |
| displaylist | int | Cache in a displaylist (default = 0) |
| Messages: |
| circle [radius (float)] { [theta-start (float)] } { [theta-end (float)] } |
| Draws a circle with radius specified by radius and center point at the current drawing position. If theta-start and theta-end are specified, then an arc will be drawn instead of a full circle. The theta-start and theta-end arguments are in terms of degrees(0-360). The current shapeorient and shapeslice values will also affect the drawing. |
| cmd_delete ( [index (int)] / [command (symbol)] ) |
| Deletes index or all instances of the command specified by the command argument from the command list. |
| cmd_enable ( [index (int)] / [command (symbol)] ) [0/1 (int)] |
| Enables/disables command in the command list. |
| cmd_insert [index (int)] [command (symbol)] [command-args (variable)] |
| Inserts command at position index in the command list. |
| cmd_replace [index (int)] [command (symbol)] [command-args (variable)] |
| Replaces position index in the command list with command. |
| cube [scale-x (float)] { [scale-y (float)] } { [scale-z (float)] } |
| Draws a box with width 2*scale-x, height 2*scale-y, depth 2*scale-z, and center point at the current drawing position. If scale-y and scale-z are not specified, they will assume the same value as scale-x. The current shapeorient, shapeslice, and shapeprim values will also affect the drawing. |
| cylinder [radius1 (float)] [radius2 (float)] [mag (float)] { [theta-start (float)] } { [theta-end (float)] } |
| Draws a cylinder with top radius specified by radius1, bottom radius specified by radius2, length specified by mag, and center point at the current drawing position. If theta-start and theta-end are specified, then a patch will be drawn instead of a full cylinder. The theta-start and theta-end arguments are in terms of degrees(0-360). The current shapeorient, shapeslice, and shapeprim values will also affect the drawing. |
| ellipse [radius1 (float)] [radius2 (float)] { [theta-start (float)] } { [theta-end (float)] } |
| Draws the ellipse specified by radius1, radius2 and center point at the current drawing position. If theta-start and theta-end are specified, then an arc will be drawn instead of a full ellipse. The theta-start and theta-end arguments are in terms of degrees(0-360). The current shapeorient and shapeslice values will also affect the drawing. |
| framecircle [radius (float)] { [theta-start (float)] } { [theta-end (float)] } |
| Draws the circumference of the circle with radius specified by radius and center point at the current drawing position. If theta-start and theta-end are specified, then an arc will be drawn instead of a full circle. The theta-start and theta-end arguments are in terms of degrees(0-360). The current shapeorient and shapeslice values will also affect the drawing. |
| frameellipse [radius1 (float)] [radius2 (float)] { [theta-start (float)] } { [theta-end (float)] } |
| Draws the circumference of the ellipse specified by radius1, radius2 and center point at the current drawing position. If theta-start and theta-end are specified, then an arc will be drawn instead of a full ellipse. The theta-start and theta-end arguments are in terms of degrees(0-360). The current shapeorient and shapeslice values will also affect the drawing. |
| framequad [x1 (float)] [y1 (float)] [z1 (float)] [x2 (float)] [y2 (float)] [z2 (float)] [x3 (float)] [y3 (float)] [z3 (float)] [x4 (float)] [y4 (float)] [z4 (float)] |
| Draws the frame of the quadrilateral specified by the four points x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4. |
| frametri [x1 (float)] [y1 (float)] [z1 (float)] [x2 (float)] [y2 (float)] [z2 (float)] [x3 (float)] [y3 (float)] [z3 (float)] |
| Draws the frame of the triangle specified by the three points x1 y1 z1 x2 y2 z2 x3 y3 z3. |
| getcmdlist |
|
Sends the command list as a series of messages out the object’s right outlet.
The command list is bracketed by max messages that indicate the beginning
and the of the current command list, and the command list is output between
these two lines, one line per command. The output takes the form: cmdlist_begin index cmdlist index command-name command-arg1 ... command-argN . cmdlist index .... cmdlist_end |
| getcmd_index [index (int)] |
| Sends the command list item at index as a message out the object’s right outlet. |
| glbegin [draw-prim (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glbindtexture [texture-name (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glblendfunc ( [src-function-name (symbol)] / [src-function-number (int)] ) ( [dst-function-name (symbol)] / [dst-function-number (int)] ) |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glclear |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glclearcolor [red (float)] [green (float)] [blue (float)] [alpha (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glcleardepth [depth (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glclipplane ( [plane-name (symbol)] / [plane-number (int)] ) [coefficient1 (float)] [coefficient2 (float)] [coefficient3 (float)] [coefficient4 (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glcolor [red (float)] [green (float)] [blue (float)] { [alpha (float)] } |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glcolormask [red (int)] [green (int)] [blue (int)] [alpha (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glcolormaterial ( [face-name (symbol)] / [face-number (int)] ) [lighting-mode (sumbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glcullface ( [face-name (symbol)] / [face-number (int)] ) |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gldepthmask [0/1 (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glcolor [near (float)] [far (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gldisable [capability (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gldrawpixels [matrix-name (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gledgeflag [0/1 (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glenable [capability (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glend |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glfinish |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glflush |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glfog [parameter-name (symbol)] [parameter-value (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glfrustum [left (float)] [right (float)] [bottom (float)] [top (float)] [near (float)] [far (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glhint [target (symbol)] [mode (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gllight ( [light-name (symbol)] / [light-number (int)] ) [parameter-name (symbol)] [parameter-values (float list)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gllightmodel [light-model (symbol)] [values (float list)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gllinestipple [factor (int)] [bit-pattern (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gllinewidth [width (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glloadidentity |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glloadmatrix [matrix-name (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gllogicop [opcode (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glmaterial ( [face-name (symbol)] / [face-number (int)] ) [parameter-name (symbol)] [parameter-values (float list)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glmatrixmode ( [mode-name (symbol)] / [mode-number (int)] ) |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glmultmatrix [matrix-name (symbol)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glnormal [x (float)] [y (float)] [z (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glortho [left (float)] [right (float)] [bottom (float)] [top (float)] [near (float)] [far (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpixeltransfer [parameter-name (symbol)] [parameter-value (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpixelxoom [x-factor (float)] [y-factor (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpointsize [size (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpolygonmode ( [face-name (symbol)] / [face-number (int)] ) ( [mode-name (symbol)] / [mode-number (int)] ) |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpolygonoffset [factor (float)] [units (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpopattrib |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpopmatrix |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpushattrib |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glpushmatrix |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glrasterpos [x (float)] [y (float)] [z (float)] [w (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glreadpixels [matrix-name (symbol)] [x (int)] [y (int)] [width (int)] [height (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glrect [x1 (float)] [y1 (float)] [x2 (float)] [y2 (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glrotate [angle (float)] [x (float)] [y (float)] [z (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glscale [x-scale (float)] [y-scale (float)] [z-scale (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glscissor [x (int)] [y (int)] [width (int)] [height (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glshademodel ( [model-name (symbol)] / [model-number (int)] ) |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gltexcoord [s (float)] [t (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gltexenv [parameter-name (symbol)] [parameter-values (float list)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gltexgen ( [coordinate-name (symbol)] / [coordinate-number (int)] ) ( [parameter-name (symbol)] / [parameter-number (int)] ) [parameter-values (float list)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gltexparameter [parameter-name (symbol)] [parameter-values (list)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gltranslate [delta-x (float)] [delta-y (float)] [delta-z (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gllookat [eye-x (float)] [eye-y (float)] [eye-z (float)] [center-x (float)] [center-y (float)] [center-z (float)] [lookat-x (float)] [lookat-y (float)] [lookat-z (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| gluortho2d [left (float)] [right (float)] [bottom (float)] [top (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glperspective [fovy (float)] [aspect (float)] [z-near (float)] [z-far (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glvertex [x (float)] [y (float)] [z (float)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| glviewport [x (int)] [y (int)] [width (int)] [height (int)] |
| Please see the OpenGL "Red Book" or "Blue Book" for more info. |
| move [delta-x (float)] [delta-y (float)] [delta-z (float)] |
| Moves the drawing position delta-x delta-y delta-z relative to the current drawing position. |
| moveto [x (float)] [y (float)] [z (float)] |
| Moves the drawing position to the location specified by x y z. |
| plane [scale-x1 (float)] { [scale-y1 (float)] } { [scale-x2 (float)] } { [scale-y2 (float)] } |
| Draws a plane with top width 2*scale-x1, left height 2*scale-y1, bottom width 2*scale-x2, right height 2*scale-y2, and center point at the current drawing position. If scale-y1 is not specified, it will assume the same value as scale-x1. If scale-x2 and scale-y2 are not specified, they will assume the same values as scale-x1 and scale-y1 respectively. The current shapeorient, shapeslice, and shapeprim values will also affect the drawing. |
| point [x (float)] [y (float)] [z (float)] |
| Draws a point at the location specified by x y z. |
| line [delta-x (float)] [delta-y (float)] [delta-z (float)] |
| Draws a line from the current drawing position to the location delta-x delta-y delta-z relative to the current drawing position. |
| lineto [x (float)] [y (float)] [z (float)] |
| Draws a line from the current drawing position to the location specified by x y z. |
| linesegment [x1 (float)] [y1 (float)] [z1 (float)] [x2 (float)] [y2 (float)] [z2 (float)] |
| Draws a line from the location specified by x1 y1 z1 to the location specified by x2 y2 z2. |
| quad [x1 (float)] [y1 (float)] [z1 (float)] [x2 (float)] [y2 (float)] [z2 (float)] [x3 (float)] [y3 (float)] [z3 (float)] [x4 (float)] [y4 (float)] [z4 (float)] |
| Draws the quadrilateral specified by the four points x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4. |
| reset |
| Delete all elements of the command list. |
| shapeorient [rot-x (float)] [rot-y (float)] [rot-z (float)] |
| Sets the current orientation for shape drawing commands (circle, framecircle, ellipse, frameellipse, sphere, cylinder, torus, cube, and plane). The rot-x, rot-y, and rot-z arguments are in terms of degrees(0-360). The order in which the orientation is applied is first rotate about x axis rot-x, then rotate about y axis rot-y, and finally rotate about z axis rot-z. |
| shapeprim [draw-prim (symbol)] |
|
Sets the current drawing primitive for shape drawing commands (circle, framecircle, ellipse, frameellipse, sphere, cylinder, torus, cube, and plane). Valid values for draw-prim are: lines line_loop line_strip points polygon quads quad_grid quad_strip triangles tri_grid tri_fan tri_strip |
| shapeslice [slice-a (int)] [slice-b (int)] |
| Sets the current level of decimation (resolution) for shape drawing commands (circle, framecircle, ellipse, frameellipse, sphere, cylinder, torus, cube, and plane). |
| sphere [radius (float)] { [theta1-start (float)] } { [theta1-end (float)] } { [theta2-start (float)] } { [theta2-end (float)] } |
| Draws a sphere with radius specified by radius and center point at the current drawing position. If theta1-start, theta1-end, theta2-start, and theta2-end are specified, then a patch will be drawn instead of a full sphere. The theta1-start, theta1-end, theta2-start, and theta2-end arguments are in terms of degrees(0-360). The current shapeorient, shapeslice, and shapeprim values will also affect the drawing. |
| torus [radius1 (float)] [radius2 (float)] { [theta1-start (float)] } { [theta1-end (float)] } { [theta2-start (float)] } { [theta2-end (float)] } |
| Draws a torus with major radius specified by radius1, minor radius specified by radius1, and center point at the current drawing position. If theta1-start, theta1-end, theta2-start, and theta2-end are specified, then a patch will be drawn instead of a full torus. The theta1-start, theta1-end, theta2-start, and theta2-end arguments are in terms of degrees(0-360). The current shapeorient, shapeslice, and shapeprim values will also affect the drawing. |
| tri [x1 (float)] [y1 (float)] [z1 (float)] [x2 (float)] [y2 (float)] [z2 (float)] [x3 (float)] [y3 (float)] [z3 (float)] |
| Draws the triangle specified by the three points x1 y1 z1 x2 y2 z2 x3 y3 z3. |
| Example: |
