jit.gl.lua
Description
jit.gl.lua provides and interface to both OpenGL and Jitter through the Lua scripting language. jit.gl.lua is similar to the js object for JavaScript.
Examples

Discussion
This 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. Additionally it can reference the name of a jit.gl.node sub-context. This value may also be set via the OB3D drawto attribute. If no argument is present, the object is implicitly added to the first valid drawing context or sub-context found in the current patch or by searching up the patcher hierarchy.
Attributes
args [16 atoms]
any symbols or numbers can be entered that will be assigned to the Lua variable 'args'. args[1] is the first typed-in argument.
autowatch [int]
Enable autowatching of the loaded script file.
file [symbol]
The file to load.
gc [int]
Garbage collection flag.
inlets [int]
The number of inlets.
last_inlet [int]
With scripts with multiple inlets, this attribute tracks what inlet was last used by an incoming message, enabling scripts to generate different behavior depending on what inlet a message is sent to.
outlets [int]
The number of outlets.
path [symbol]
The path of the loaded script.
Common Box Attributes
OB3D Attributes
Messages
int
float
list
anything
call
closebang
(mouse)
loadbang
open
read
wclose
OB3D Messages
See Also
Name | Description |
---|---|
Working with OpenGL | Working with OpenGL |
Lua in Max | Lua in Max |
js | |
jit.gl.sketch | |
jit.gl.lua Overview | jit.gl.lua Overview |
jit.gl.lua OpenGL Bindings | jit.gl.lua OpenGL Bindings |
jit.gl.lua Color Bindings | jit.gl.lua Color Bindings |
jit.gl.lua Vector Math | jit.gl.lua Vector Math |