Yeah, the drawmask did just that wen it was avaiable, but it was slow and the tga version is much faster so i removed that function.

However, trhere are 2 ways of doing this.

The first way is to combine the 2 bitmaps during runtime with the following
function. (note that the source and the dest can't be the same bitmap).
Load the original bitmap with the imagelist and then replace the bitmap with GLXImageList1.Items[0].Picture.Bitmap.Assign(TheDestBitmap) and finnaly rebuild the texture GLXImageList1.Items[0].BuildTexture.



Type TRGBQuadArray = Array[WORD] of TRGBQuad;
Type PRGBQuadArray = ^TRGBQuadArray;

Type TRGBTripleArray = Array[WORD] of TRGBTriple;
Type PRGBTripleArray = ^TRGBTripleArray;


procedure LoadDataAlpha(Source, Dest: TBitmap);
var X, Y: Integer;
var SLine: PRGBTripleArray;
var DLine: PRGBQuadArray;
begin
Source.PixelFormat:=pf24Bit;
Dest .PixelFormat:=pf32Bit;

Dest.Width :=Source.Width;
Dest.Height:=Source.Height;

For Y:=0 to Source.Height-1 do begin
SLine := Source.ScanLine[Y];
DLine := Dest .ScanLine[Y];
For X:=0 to Source.Width-1 do begin
DLine[X].rgbRed :=SLine[X].rgbtRed;
DLine[X].rgbGreen :=SLine[X].rgbtGreen;
DLine[X].rgbBlue :=SLine[X].rgbtBlue;
DLine[X].rgbReserved:=Trunc((SLine[X].rgbtRed + SLine[X].rgbtGreen + SLine[X].rgbtBlue) / 3);
end;
end;
end;

The second, and the easiest way is to combine the bitmap with the alpha bitmap in a drawing program like Paint Shop Pro or Photoshop and then save it as a tga or png file.

Here's a steb-by-step guide on how to do in in psp:

1. Open both bitmaps (the colored is named Image1 and the grayscale Alpha1).
2. Select the Image1.
3. From the layer meny select "New Mask Layer->From Image"
4. Select Alpha1 as source, press Ok.
5. Save the mask into the alpha channel by selecting "Load / Save Mask->Save Mask To Alpha Channel" from the layers meny.
6. Press ok.
7. Delete the mask layer. Select no on the question "Doy you wan't to merge the mask..." ( Delete either vie the layer meny's "Delete" or by right clicking on the layer in the layer palette and selecting "Delete).
8. Save the image as "Truevision targa".
9. Load the file into GLXTreem with GLXImageList1.LoadTexture