Pike v8.1 release 6

Class GLUE.BaseDWIM

Inheritance graph
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.Image

The texture image.

"xsize" : int

The image dimensions. If not provided, the dimensions of the "image" member will be used.

"ysize" : int
"height" : int
"width" : int
"alpha" : int

The alpha mode.

"mipmap" : bool

Should the texture be mipmapped or not.

"clamp" : bool

Should the texture be clamped or not.

"mode" : int

The texture mode.

"debug" : string

The 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.