FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

load-texture

Arguments: pathname &key (icon-index 0)

Reads a pixmap from any device-independent bitmap file. These are typically .bmp files. You can also load .ico (icon) files. If you are loading a .ico file, the icon-index keyword argument specifies which icon to read from the file. The value of icon-index must be a non-negative integer, where zero indicates the first icon in the file. icon-index defaults to zero. icon-index is ignored if you are not loading a .ico file.

load-texture returns three values. The first two are the texture and a texture-info. The texture-info contains a colormap read from the pixmap file and is therefore appropriate for passing along with the pixel-map to the function copy-pixels-to-stream in order to draw the pixel-map on a window in its original colors. The third returned value is nil when a .bmp file is loaded. When a .ico file is loaded, the third returned value is a bitmap mask that defines the transparent areas of the image. This mask bitmap can be passed along with the main pixmap to copy-pixels-with-mask-to-stream.

The function load-texture-info reads and returns the texture-info of the file without returning the pixmap. It allows you to get the texture-info quickly, if that is all you want.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version