jit.gl.cubemap Reference

Manage a cubemap texture target



Maintains a cubemap texture target in an OpenGL context. It has 6 inputs -- one for each face of the cube. Cubemaps are typically used to map an environment for material effects such as reflection and refraction.



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.




adapt [int]

Enable adapt to input (default = 1). When enabled the texture output dimensions will match the input dimensions.

bordercolor [4 floats]

Sets the texture bordercolor

edge_length [int]

The length in pixels of a cube edge. Each face of the sube will be edge_length*edge_length in dimension.

file [symbol]

Sets an image file to read that is in panorama format

filter [symbol]

Filter applied to the texture.

matrix_name [6 symbols]


The named matrix to access (default = none)

mipmap [symbol]

Texture mipmap style.

wrap [3 symbols]

Texture wrapping mode.

Common Box Attributes

OB3D Attributes



Sets binding of the cubemap to texture geometry.


Load a matrix formatted in a cross shape containing every face of the cubemap. The panorama matrix layout is a cross shape holding the 6 faces of the cube. The faces are in a 4x3 grid where the rows are formatted as follows:
  1. ** py ** **
  2. nx pz px nz
  3. ** ny ** **


Read in a panorama formatted image file.


Unbinds the cubemap after a bind operation.

OB3D Messages

See Also

Name Description
Working with OpenGL Working with OpenGL