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

jit.gl.node Reference

Create hierarchical rendering groups

jit.gl.node

Description

Use jit.gl.node to construct hierarchical rendering groups. jit.gl.node creates sub-contexts of child objects that can be modified, rendered, and captured together as a functional group.

Examples

Discussion

Child objects can be added to a jit.gl.node sub-context in one of the following ways:
The jit.gl.node name attribute is provided as the child object argument, or as the child object drawto attribute.
Any objects connected to the jit.gl.node middle outlet are added to the sub-context.
Child objects are implicitly added to a jit.gl.node in the same patcher, if not already bound to another context.

Jit.gl.node can overwrite standard OB3D attributes of its child objects. For example setting poly_mode on the jit.gl.node will overwrite the current value of poly_mode on every child object.

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

adapt [int]

Adapt the capture texture dimensions to the context window size (default = 1).

capture [int]

Capture to the internal texture (default = 0).

Possible Values:

0 = disabled. Rendering is performed according to the parent context, which can be another jit.gl.node or a jit.gl.render object.
1 = enabled. Rendering is captured to a texture and the texture name is output out the left outlet.
> 1 = outputs multiple render targets (mrt) to the left outlet in the format "jit_gl_texture <texture_name> <texture_name>".

dim [2 ints]

Capture texture dimensions, used when adapt = 0 (default = 256 256).

erase_color [4 floats]

Background color of viewport and capture texture (default = 0.2 0.2 0.2 1.). Not compatible with non-automatic mode objects.

fsaa [int]

Enable full screen anti-aliasing on the texture targets when capture is enabled (default = 0)

out_name [symbol]

Capture texture name

out_names [32 symbols]8.0.0

g/s(get)

Capture texture name list. The list length is equal to the number of capture targets enabled.

type [symbol]

Capture texture type (default = auto)

Possible values:

'auto' ( 8bit unsigned byte )
'char' ( 8bit unsigned byte )
'long' ( 32bit integer )
'half' ( 16bit float )
'float' ( 32bit float )
'float16' ( 16bit float )
'float32' ( 32bit float )

Common Box Attributes

OB3D Attributes

Messages

draw

Draw the node

getscene_dict

Arguments

attribute mode [symbol]
Outputs a dictionary of scene elements out the dumpout prepended by the symbol "scene_dict". The optional argument specifies the attribute mode. If no argument is supplied only the spatial transform attributes are included.

If the arg all_attrs is supplied all object attributes are included.
If the arg modified_attrs is supplied any attributes with modified state are included.

sendoutput

Arguments

message [symbol]
values [list]
Send messages to the internal texture objects used for capture output

OB3D Messages

See Also

Name Description
Working with OpenGL Working with OpenGL
Video and Graphics Programming Tutorials Video and Graphics Programming Tutorials
jit.gl.gridshape
jit.gl.render
jit.gl.texture