-
Notifications
You must be signed in to change notification settings - Fork 103
Texture
daemonburrito edited this page May 3, 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.
Purpose:
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
Purpose:
Activate the texture using the given WebGL texture_unit, valid inputs are gl.TEXTURE{x}.
Returns:
none
Purpose:
Clear the texture from it's last use, bind a null in it's place.
Returns:
none