-
Notifications
You must be signed in to change notification settings - Fork 103
Texture
cjcliffe edited this page Oct 15, 2011
·
4 revisions
The Texture class provides a container and loader for images. Textures can be applied to a Material or subclasseed for advanced integration such as the case of PJSTexture.
Parameters:
-
img_path
: The path to an image, either relative or absolute, i.e../images/brick.jpg
orhttp://mydomain.com/brick.jpg
. -
filter_type
: Filter type to set for this image, see setFilter for possible enums.
Set the filter type for the texture (interpolation)
Parameters:
-
filter_type
: The filter type to set the texture to, options are one of the following CubicVR.enums:enums.texture.filter.LINEAR
-
enums.texture.filter.LINEAR_MIP
(default) enums.texture.filter.NEAREST
enums.texture.filter.NEAREST_MIP
Returns:
none
Activate the texture using the given WebGL texture_unit, valid inputs are gl.TEXTURE{x}.
Returns:
none
Clear the texture from it's last use, bind a null in it's place.
Returns:
none