jit.gl.texture
Description
Creates OpenGL textures - buffers of image data used in drawing 3D geometry. jit.gl.texture is similar to jit.matrix except that textures reside on the graphics card.
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
adapt [int]
Enable adapt to input (default = 1). When enabled the texture output dimensions will match the input dimensions.
anisotropy [int]
Anisotropic filter width (default = 0). Anisotropic filtering is an advanced filtering technique that takes multiple samples and blends the results together. Using anisotropy requires rectangle mode disabled.
apply [symbol]
Texture apply mode
Possible values:
'replace'
'decal'
'modulate'
'blend'
'combine'
autoclear [int]
Auto-clear texture during capture
autoscale [int]
Auto-scale texture coordinates
blendcolor [4 floats]
Texture blend color
bordercolor [4 floats]
Texture border color
capture_buffer [symbol]
The capture buffer type when capture is enabled.
Possible values:
'color'
'depth'
capture_depthbits [int]
Capture buffer depth bits
capture_source [symbol]
Capture source buffer
colormode [symbol]
Texture color mode
Possible values:
'auto'
'alpha'
'depth'
'intensity'
'luminance'
'lumalpha'
'rgb'
'argb'
'uyvy'
compare_func [symbol]
Shadow mapping comparison function
compare_mode [symbol]
Shadow mapping comparison mode
compress [symbol]
Texture compression mode
Possible values:
'none'
'dxt1'
'dxt3'
'dxt5'
correction [symbol]
Texture compression mode
Possible values:
'fastest'
'nicest'
defaultimage [symbol]
Texture default image
Possible values:
'checker'
'black'
'white'
dim [3 ints]
The texture dimensions when adapt is disabled (default = 256 256 0)
dstdimend [3 ints]
Matrix destination dimension end position. Used when submitting a subtexture via the
message.dstdimstart [3 ints]
Matrix destination dimension start position. Used when submitting a subtexture via the
message.erase_color [4 floats]
Capture erase color
file [symbol]
Image or file to load
filter [symbol]
Texture filter mode (default = linear)
Possible values:
'none'
'nearest'
'linear'
flip [int]
Flip texture
function [2 symbols]
Texture multitexturing combine function
Possible values:
'replace'
'modulate'
'add'
'addisgned'
'subtract'
'interpolate'
'dot3rgb'
'dot3rgba'
mipmap [symbol]
Enable mipmap interpolation (default = none). Mipmap interpolation is used for minification filtering (meaning the area of the fragment in texture space is larger than a texel). Using mipmap interpolation requires rectangle mode disabled.
Possible values:
'none'
'nearest'
'linear'
'bilinear'
'trilinear'
offset [3 ints]
Texture submission offset
operand [6 symbols]
Texture multitexturing operand
Possible values:
'color'
'oneminuscolor'
'alpha'
'oneminusalpha'
priority [float]
Texture priority
rectangle [int]
Enable texture rectangle mode (default = 1). When enabled the internal GL texture is treated as a rectangular texture, and must be referenced using sampler2DRect and sampled using texture2DRect when sampled from a GLSL shader. When disabled the texture dimensions are upsampled to the nearest power of two value, and must be referenced and sampled using sampler2D and texture2D. Certain texture attributes and GLSL effects require rectangle mode disabled.
thru [int]
Enable thru mode
source [6 symbols]
The texture source targets to use for both source and destination textures (only when apply == combine).
Possible values:
'texture'
'color'
'constant'
'previous'
srcdimend [3 ints]
Matrix source dimension end position. Used when submitting a subtexture via the
message.srcdimstart [3 ints]
Matrix source dimension start position. Used when submitting a subtexture via the
message.texgen [symbol]
Texture coordinate generation mode
Possible values:
'none'
'objectspace'
'eyespace'
'environment'
'projected'
texture_mode [symbol]
Depth texture mode
Possible values:
'luminance'
'intensity'
'alpha'
type [symbol]
The texture data type (default = auto). When type is auto the type is set by the input texture or matrix type. If the texture is the target of a capture operation, auto defaults to char .
Possible values:
'auto'
( Adapt to input data type )
'char'
( 8bit unsigned byte )
'long'
( 32bit integer )
'half'
( 16bit float )
'float'
( 32bit float )
'float16'
( 16bit float )
'float32'
( 32bit float )
usedstdim [int]
Enable matrix destination dimension
usesrcdim [int]
Enable matrix source dimension
weight [2 ints]
The weight factors for combining both source and destination textures (only when apply == combine).
wrap [3 symbols]
Texture wrap mode
Possible values:
'clamp'
'repeat'
'clampedge'
'clampborder'
'mirroredrepeat'
Common Box Attributes
OB3D Attributes
Messages
begin_capture
bind
end_capture
read
Arguments
subtex_matrix
unbind
OB3D Messages
See Also
Name | Description |
---|---|
Working with Video in Jitter | Working with Video in Jitter |
Working with OpenGL | Working with OpenGL |
Video and Graphics Programming Tutorials | Video and Graphics Programming Tutorials |
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.slab | |
jit.gl.text2d | |
jit.gl.text3d | |
jit.gl.videoplane | |
jit.gl.volume | |
Tutorial 42: Slab: Data Processing on the GPU | Tutorial 42: Slab: Data Processing on the GPU |