Moai SDK  1.5 revision 1 (MoaiEdition)
MOAITextureBase Class Reference
Inheritance diagram for MOAITextureBase:
MOAIGfxResource MOAIGfxState MOAIFrameBufferTexture MOAIImageTexture MOAITexture

List of all members.

Function List

  getSize
  release
  setFilter
  setWrap

Function Documentation

Returns the width and height of the texture's source image. Avoid using the texture width and height to compute UV coordinates from pixels, as this will prevent texture resolution swapping.


function getSize ( MOAITextureBase self )
Parameters:
self ( MOAITextureBase )
Returns:
width ( number ), height ( number )

Releases any memory associated with the texture.


function release ( MOAITextureBase self )
Parameters:
self ( MOAITextureBase )
Returns:
nil

Set default filtering mode for texture.


function setFilter ( MOAITextureBase self, number min [, number mag ] )
Parameters:
self ( MOAITextureBase )
min ( number ) One of MOAITextureBase.GL_LINEAR, MOAITextureBase.GL_LINEAR_MIPMAP_LINEAR, MOAITextureBase.GL_LINEAR_MIPMAP_NEAREST, MOAITextureBase.GL_NEAREST, MOAITextureBase.GL_NEAREST_MIPMAP_LINEAR, MOAITextureBase.GL_NEAREST_MIPMAP_NEAREST
mag ( number ) Optional. Defaults to value passed to 'min'.
Returns:
nil

Set wrapping mode for texture.


function setWrap ( MOAITextureBase self, boolean wrap )
Parameters:
self ( MOAITextureBase )
wrap ( boolean ) Texture will wrap if true, clamp if not.
Returns:
nil