A newer version of Max is available. Click here to access the latest version of the documentation

jit.gl.imageunit Reference

Use Apple Image Units

jit.gl.imageunit

Description

Loads any Apple Image Unit and permits the processing of incoming matrix and texture data, with resulting texture output, similar to jit.gl.slab.

Examples

Discussion

For more information on Apple Image Units, please see Apple's Core Image developer pages.
The jit.gl.imageunit 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

activeinput [int]

Input number used for jit_matrix method (default = 0) Useful for multiple input Image Units used from Java or JavaScript.

adapt [int]

Enables or disables adapting and resizing to input source dimensions (default = 1).

colormode [symbol]

The colorspace mode to use for each input textures (default = auto). Supported modes are:
auto
luminance
intensity
depth
lumalpha
rgb
argb
uyvy

dim [2 ints]

The dimensions of the output jit.gl.texture object when adapt is disabled (default = 256 256)

dimscale [2 floats]

Sets the scaling of output dims based on the object's leftmost input.

fx [symbol]

Image Unit filter name (default = "Color Matrix") Possible choices are values returned from geteffectlist. Similar to loadeffect method, but can be specified as an attribute argument.

inputs [int]

Input count (default = 2)

out_name [symbol]

g/s(get)

Returns the name of the internal jit.gl.texture object.

paramsafe [int]

Parameter limit flag (default = 0) Permits the limiting of parameter values to the range specified by the Image Unit.

thru [int]

Thru mode flag (default = 1) When the flag is set, a matrix is output when another one is received.

verbose [int]

Verbose mode flag (default = 0) In verbose mode, the jit.gl.imageunit object will print out messages useful for debugging.

Common Box Attributes

OB3D Attributes

Messages

geteffectlist

Sends the names of all the available Image Units out the right-most outlet.

getparam

Arguments

name [symbol]
Sends the data values for the indicated shader parameter for the currently loaded Image Unit out the right-most outlet. (synonym for getparamval)

getparamdefault

Arguments

name [symbol]
Sends the default data values for the indicated shader parameter for the currently loaded Image Unit out the right-most outlet.

getparamidentity

Arguments

name [symbol]
Sends the data values to result in no effect for the indicated shader parameter for the currently loaded Image Unit out the right-most outlet.

getparamlist

Sends the names of all the currently loaded Image Unit parameters out the right-most outlet.

getparammax

Arguments

name [symbol]
Sends the recommended maximum value for the indicated parameter for the currently loaded Image Unit out the right-most outlet.

getparammin

Arguments

name [symbol]
Sends the recommended minimum value for the indicated parameter for the currently loaded Image Unit out the right-most outlet.

getparamslidermax

Arguments

name [symbol]
Sends the recommended maximum UI value for the indicated parameter for the currently loaded Image Unit out the right-most outlet.

getparamslidermin

Arguments

name [symbol]
Sends the recommended minimum UI value for the indicated parameter for the currently loaded Image Unit out the right-most outlet.

getparamtype

Arguments

name [symbol]
Sends the name of the datatype for the indicated parameter for the currently loaded Image Unit out the right-most outlet.

getparamval

Arguments

name [symbol]
Sends the data values for the indicated shader parameter for the currently loaded Image Unit out the right-most outlet.

loadeffect

Arguments

name [symbol]
Loads the given Image Unit.

param

Sets a parameter of the imageunit (e.g., param param_name [list of param values] ).

read

Arguments

name [symbol]
Loads the given Image Unit. (synonym for loadeffect)

sendinput

Arguments

message [list]
Sends the input jit.gl.texture object attached to the active inlet the corresponding message.

sendoutput

Arguments

message [list]
Sends the output jit.gl.texture object the corresponding message.

OB3D Messages

See Also

Name Description
Working with OpenGL Working with OpenGL
jit.gl.graph
jit.gl.gridshape
jit.gl.handle
jit.gl.isosurf
jit.gl.mesh
jit.gl.model
jit.gl.nurbs
jit.gl.plato
jit.gl.shader
jit.gl.sketch
jit.gl.slab
jit.gl.text2d
jit.gl.text3d
jit.gl.texture
jit.gl.videoplane
jit.gl.volume