Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
GLUE
GLUE.BaseTexture

Method GLUE.BaseTexture()->create_texture()


Method create_texture

void create_texture(mapping|void imgs, int(0..1)|void mipmap, int|void width, int|void height)

Description

Actually creates the texture.

Parameter imgs

If zero, a black texture with the dimensions width * height will be generated. Otherwise imgs should be a mapping as follows.

"image" : Image.Image

The actual image to be used as texture. It will be cropped/padded to meet the dimensions given in width and height .

"alpha" : Image.Image

Optional image to be used as alpha channel, depending on the alpha value given to create /construct .


Parameter mipmap

If 1, the texture will be mipmapped.

Parameter width
Parameter height

The dimensions of the texture. If omitted the dimensions of the images in imgs will be used.

See also

resize