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

jit.gl.texture

Manages a GL texture

Description

The jit.gl.texture object creates an OpenGL texture from a jit.matrix object with less than 4 planes and fewer than 3 dimensions. Multiple jit.gl.texture objects can be attached to any OB3D thru the OB3D texture method. If the texture is attached to an OB3D, the OB3D will automatically bind the jit.gl.texture object as needed. The jit.gl.texture 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.

Information for Jitter 3D Object (OB3D) messages and attributes to this object

Messages

begin_capture Manually forces the texture to start capturing the contents of the OpenGL framebuffer.
bind Manually binds the texture object.
end_capture Manually forces the texture to stop capturing the contents of the OpenGL framebuffer.
read filename [symbol]
Loads the given image or movie from disk.
unbind Manually unbinds the texture object.
tomatrix name [symbol]
Updates the jit.matrix object with the data contained inside the jit.gl.texture object.
subtex_matrix Submits the incoming matrix as a subtexture of the previously submitted matrix

Attributes

Name Type g/s Description
thru int Thru mode flag (default = 1) When the flag is set, a texture is output when another one is received.
adapt int Enables or disables adapting and resizing to input source dimensions (default = 1).
anisotropy int The anisotropic filter width. (default = 0)
apply symbol The apply mode to use. (default = auto) Supported modes are:
replace
decal
modulate
blend
combine
autoscale int Flag to enable or disable automatically scaling the texture coordinates for non-uniform texture targets (default = 1).
blendcolor float The rgba coefficients for the blend color. (default = 0 0 0 0)
bordercolor float The rgba coefficients for the border color. (default = 0 0 0 0)
capture_buffer symbol The word capture_buffer, followed by a symbol, sets which buffer to capture when the target of an ob3d @capture attribute. Valid options are:
color
depth
capture_depthbits int The word capture_depthbits, followed by a number, sets the number of bits of the depth buffer for render-to-texture mode.
capture_source symbol The word capture_source, followed by a symbol, sets the name of the target buffer to read from (such as the depth buffer) of an RTT texture.
colormode symbol The colorspace mode to use. (default = auto) Supported modes are:
alpha
depth
intensity
luminance
lumalpha
rgb
argb
uyvy
auto
compare_func symbol Sets the comparison function for shadow mapping when the texture is a depth texture.
compare_mode symbol Sets the comparison mode for shadow mapping when the texture is a depth texture.
compress symbol The hardware accelerated compression codec to use. (default = none) Supported codecs are:
none
dxt1
dxt3
dxt5
correction symbol The correction mode to use. (default = fastest) Supported modes are:
fastest
nicest
debug int Flag to enable or disable debug mode to draw a textured quad (default = 0).
defaultimage symbol The default image to generate if a jit.matrix object is not attached to the left-most inlet. (default = checker) Supported modes are:
checker
black
white
dim int The dimensions for the jit.gl.texture object (default = 256 256 0)
dstdimend int The destination dimension end position (default = all dim values minus 1)
dstdimstart int The source dimension start position (default = all 0)
file symbol The image or movie file to load (default = none)
filter symbol The filter mode to use. (default = none) Supported modes are:
none
nearest
linear
flip int Flag to enable or disable vertically flipping the texture data to account for the lower-left origin in OpenGL (default = 1).
function symbol The combine function to use for both source and destination textures (only when apply == combine). (default = fastest) Supported modes are:
replace
modulate
add
addsigned
subtract
interpolate
dot3rgb
dot3rgba
mipmap symbol The mipmap interpolation mode to use. (default = none) Supported modes are:
none
nearest
linear
bilinear
trilinear
mode symbol The update mode to use. (default = auto) Supported modes are:
dynamic
static
capture
offset int The dimensional offsets for submitting texture data. (default = 0 0 0)
operand symbol The operand to use for both source and destination textures (only when apply == combine). (default = fastest) Supported modes are:
color
oneminuscolor
alpha
oneminusalpha
priority float The priority hint for informing the graphics driver how to manage the texture cache. (default = 0)
rectangle int Flag to enable or disable using a rectangular texture target (default = 1)
If enabled, certain texture attribute settings may not be available depending on the capabilities of your graphics hardware (eg wrap = repeat).
share int Flag to enable or disable sharing texture data across multiple OpenGL contexts (default = 1).
source symbol The source targets to use for both source and destination textures (only when apply == combine). (default = fastest) Supported modes are:
texture
color
constant
previous
srcdimend int The source dimension end position (default = all dim values minus 1)
srcdimstart int The source dimension start position (default = all 0)
texgen symbol The texture coordinate generation mode to use. (default = none) Supported modes are:
none
objectspace
eyespace
environment
projected
texture_mode symbol Sets the depth texture mode. Valid modes are:

luminance
intensity
alpha
type symbol The name of the datatype to use. (default = auto) Supported modes are:
auto (adapt to matrix datatype)
char (8bit unsigned byte)
long (32bit integer)
half (16bit float)
float (32bit float)
float16 (16bit float)
float32 (32bit float)
usedstdim int Destdim use flag (default = 0) When the flag is set, the destination dimension's attributes are used when copying an input matrix to an internal matrix.
usesrcdim int Srcdim use flag (default = 0) When the flag is set, the source dimension's attributes are used when copying an input matrix to an internal matrix.
weight int The weight factors for combining both source and destination textures (only when apply == combine). (default = 1.0 1.0)
wrap symbol The wrap mode to use. (default = fastest) Supported modes are:
clamp
repeat
clampedge
clampborder
mirroredrepeat

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.gl.graph Open GL floating-point data visualization
jit.gl.gridshape Generate simple geometric shapes as a connected grid
jit.gl.handle Use mouse movement to control position/rotation
jit.gl.isosurf Generates a GL based surface extraction
jit.gl.mesh Generates GL geometry from existing data
jit.gl.model Read and draw Wavefront .obj models
jit.gl.nurbs Generate NURBS surface
jit.gl.plato Generate platonic solids
jit.gl.render Render Open GL
jit.gl.shader Manages a GL shader
jit.gl.sketch GL parallel to lcd
jit.gl.slab Performs a GL accelerated grid-based evaluation
jit.gl.text2d Write bitmap text
jit.gl.text3d Write vector text
jit.gl.videoplane GL accelerated video plane
jit.gl.volume Creates a GL accelerated volume vizualization
Tutorial 42: Slab: Data Processing on the GPU Tutorial 42: Slab: Data Processing on the GPU