Class GLUE.BaseDWIM
- Description
A mixin class with a dwim create function.
- Method
create
GLUE.BaseDWIM GLUE.BaseDWIM(mixed...args)- Description
This create function has the following heuristic:
If a mapping is encountered, the following information will be attempted to be extracted.
"image":Image.ImageThe texture image.
"xsize":intThe image dimensions. If not provided, the dimensions of the
"image"member will be used."ysize":int"height":int"width":int"alpha":intThe alpha mode.
"mipmap":boolShould the texture be mipmapped or not.
"clamp":boolShould the texture be clamped or not.
"mode":intThe texture mode.
"debug":stringThe debug name associated with this texture.
If an object is encountered in the argument list, the first object will be used as texture image and the second as texture alpha.
If a string is encountered in the argument list, it will be used as debug name associated with this texture.
Once all mappings, strings and objects are removed from the argument list, the remaining integers will be interpreted as width, height, alpha, mipmap and mode, unless there is only one argument. In that case it will be interpreted as the alpha mode.