jit.gl.slab Performs a GL accelerated grid-based evaluation

The jit.gl.slab object provides a streamlined interface for performing a general purpose GPU based grid evaluation. Multiple jit.matrix or jit.gl.texture objects can be attached to inlets and used in combination with a jit.gl.shader object and a specialized form of view-aligned geometry with a one-to-one pixel mapping to perform an accurate spatial evaluation. The results of this calculation are automatically saved and made available via a jit.gl.texture object referenced from the leftmost outlet. The resulting jit.gl.texture object can then be bound to any OB3D object, sent to a jit.matrix object, or used as an input to another jit.gl.slab object.
The jit.gl.slab 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
adapt long 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
depth float The depth or z-offset for the slab geometry. (default = 0.0)
dim int list[2] The dimensions of the output jit.gl.texture object when adapt is disabled (default = 720 480)
displaylist int Cache in displaylist flag (default = 0) This feature may be used to speed up rendering time by creating and storing a list of gl drawing commands on the graphics card. This will have no effect if matrixoutput turned on.
edges long list[4] Flags to enable or disable rendering each edge (only valid when shape == edges) (default = 1 1 1 1)/
file symbol The shader file to use (default = none)
out_name (get) symbol Returns the name of the internal jit.gl.texturer object.
param (set) atom list[256] Sets the given parameter for the internal jit.gl.shader object with the given atom values.
rect float list[4] The extent or rectangular coordinates bounding the slab geometry (default = 0 0 1 1)/
subdiv int list[2] The number of subdivisions to use for generating grid based geometry (only valid when shape == grid) (default = 1 1)
texrect float list[4] The extent or rectangular coordinates bounding the texture coordinates for the slab geometry (default = 0 0 1 1)/
shape symbol The shape or geometry to render (default = cubes) Supported modes are:
quad
grid
edges
wrap long list[4] Flags to enable or disable wrapping along each edge (only valid when shape == edges) (default = 0 0 0 0)

Messages:
dump [type (symbol)]
Dumps the indicated shader data to the max console window. Valid types are params, source, assembly.

getparamlist
Sends the names of all the internal jit.gl.shader object shader parameters out the right-most outlet.

getparamtype [name (symbol)]
Sends the name of the datatype for the indicated shader parameter for the internal jit.gl.shader object out the right-most outlet.

getparamval [name (symbol)]
Sends the data values for the indicated shader parameter for the internal jit.gl.shader object out the right-most outlet.

getparamdefault [name (symbol)]
Sends the default data values for the indicated shader parameter for the internal jit.gl.shader object out the right-most outlet.

jit_gl_texture [name (symbol)]
Changes the active inlet to reference the corresponding jit.gl.texture object with the given name. If the thru attribute is enabled, this will force an evaluation resulting in the name of the slab output texture to be sent out the leftmost outlet.

jit_matrix [name (symbol)]
Changes the active inlet to reference the corresponding jit.matrix object with the given name. If the thru attribute is enabled, this will force an evaluation resulting in the name of the slab output texture to be sent out the leftmost outlet.

read [filename (symbol)]
Loads the given JXS shader file from disk.

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

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

sendshader [message (list)]
Sends the internal jit.gl.shader object the corresponding message.

Example:

See Also:
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.render, jit.gl.shader, jit.gl.sketch, jit.gl.text2d, jit.gl.text3d, jit.gl.texture, jit.gl.videoplane, jit.gl.volume