LuaSTG-x Core API
lstg::ResTexture Class Reference

Public Member Functions

function create (local name, local path)
 
function createWithTexture (local name, local texture)
 
function getInfo ()
 
function getTexture ()
 
function getTriangles ()
 
function render (local blend, local quad)
 
function setTexParameters (local minFilter, local magFilter, local wrapS, local wrapT)
 lstg.ResTexture More...
 
function setTriangles (local tri)
 
function setWrap (local wrap)
 

Member Function Documentation

◆ create()

function create ( local  name,
local  path 
)
Parameters
namestring
pathstring
Returns
lstg.ResTexture

◆ createWithTexture()

function createWithTexture ( local  name,
local  texture 
)
Parameters
namestring
texturecc.Texture2D
Returns
lstg.ResTexture

◆ getInfo()

function getInfo ( )
Returns
map_table

◆ getTexture()

function getTexture ( )
Returns
cc.Texture2D

◆ getTriangles()

function getTriangles ( )

◆ render()

function render ( local  blend,
local  quad 
)
Parameters
blendlstg.RenderMode
quadcc.V3F_C4B_T2F_Quad
Returns
boolean
重载
fun(self:lstg.ResTexture, quad:cc.V3F_C4B_T2F_Quad):boolean

◆ setTexParameters()

function setTexParameters ( local  minFilter,
local  magFilter,
local  wrapS,
local  wrapT 
)

lstg.ResTexture

see Filtering

and Repeating and Clamping Textures

Parameters
minFilterccb.SamplerFilter|string
magFilterccb.SamplerFilter|string @'linear'/'nearest'
wrapSccb.SamplerAddressMode|string
wrapTccb.SamplerAddressMode|string @'repeat'/'mirrored_repeat'/'clamp_to_edge'

◆ setTriangles()

function setTriangles ( local  tri)
Parameters
trilstg.Triangles
Returns
lstg.ResTexture

◆ setWrap()

function setWrap ( local  wrap)
Parameters
wrapccb.SamplerAddressMode|number

The documentation for this class was generated from the following file: