-
Notifications
You must be signed in to change notification settings - Fork 103
Texture
cjcliffe edited this page Mar 21, 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.
### _Texture( img_path, filter_type )_ **Parameters**: *img_path* - The path to an image, either relative or absolute, i.e. `./images/brick.jpg` or `http://mydomain.com/brick.jpg`. *filter_type* - Filter type to set for this image, see *setFilter* for possible enums.
## Methods:
### _setFilter( filter_type )_ **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
- enums.texture.filter.NEAREST
- enums.texture.filter.NEAREST_MIP
default: enums.texture.filter.LINEAR_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