new texture() → {vgl.texture}
- Description:
Create a new instance of class texture.
- Source:
Returns:
- Type
- vgl.texture
Methods
bind(renderState)
- Description:
Create texture and if already created use it.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
computeInternalFormatUsingImage()
- Description:
Compute internal format of the texture.
- Source:
image() → {vgl.image}
- Description:
Get image used by the texture.
- Source:
Returns:
- Type
- vgl.image
nearestPixel() → {boolean}
- Description:
Get nearest pixel flag for the texture.
- Source:
Returns:
- Type
- boolean
setImage(image) → {boolean}
- Description:
Set image for the texture.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
image |
vgl.image |
Returns:
- Type
- boolean
setNearestPixel(nearest) → {boolean}
- Description:
Set nearest pixel flag for the texture.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nearest |
boolean | pixel flag |
Returns:
- Type
- boolean
setTextureUnit(unit) → {boolean}
- Description:
Set texture unit of the texture. Default is 0.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
unit |
number |
Returns:
- Type
- boolean
setup(renderState)
- Description:
Create texture, update parameters, and bind data.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
textureHandle() → {number}
- Description:
Return the texture handle.
- Source:
Returns:
- Type
- number
textureUnit() → {number}
- Description:
Get texture unit of the texture.
- Source:
Returns:
- Type
- number
undoBind(renderState)
- Description:
Turn off the use of this texture.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
updateDimensions()
- Description:
Update texture dimensions.
- Source: