Quote Originally Posted by tpascal
if the pixel IS NOT pinky then put alpha = 1.
Actually alpha would be 255 for visible areas, 0 for complete invisibility But yes, that's the technique i used too.

For data passing it could be something like this:

[pascal]// Define record for each pixel
TPixelData = record
r,g,b,a: byte;
end;

// Way of using dynamic arrays...
// Expected data is actually 2 dimensional but it is
// continuous data in width blocks
TPixelArray = array[0..0] of TPixelData;
PPixelArray = ^TPixelArray;

// Then to allocate:
procedure LoadTexture(...);
var data: PPixelArray;
begin
data:=allocmem(width*height*sizeof(TPixelData));
// Do data filling and texture loading here...
Freemem(data);
end;[/pascal]