Hi 
Does anybody know if there is a way to tell AGS to to set the alpha bit in a pixel to 255 when that pixel was rendered, rather than leaving the alpha byte empty when in 32bit colour mode ?
I am attempting to copy each layer of the AGS display out onto separate textures so that I can do post-render effects on each of the layers individualy.
So, for instance I let AGS render the background, I then memcpy the scanlines from AGS frame buffer into my textures, and then memset the whole AGS framebuffer area to 0's. This is to make AGS then render the Sprites onto a clean surface. I can then repeat this procedure once the sprites are rendered, then the GUI and finaly the mouse cursor, leaving me with a seperate texture for each layer, that I can do my effects with and finaly render them myself.
However, when AGS goes on to render the sprites, it will write the RGB values into its frame-buffer, but it will leave the 4th byte of every pixel as 0 (the alpha value). This means when I memcpy the scanlines for the sprites they have 0 alpha. I need my spritelayer to have alpha of 0 where nothing was drawn (the memset after the background does this), however I also need the pixels that were drawn by the sprites to have an alpha value of 255.
I can check myself if RGB exist and then set the alpha-byte myselfe, otherwise leave it as 0, however doing this means i have to check for RGB in every pixel and copy it accordingly, meaning that I cant memcopy entire scanlines which makes the whole thing too slow to be of any use.
But if the Alpha bit was filled by AGS, then I could memcpy every scanline in an acceptable time.
Any ideas would be greatly appreciated.
Cheers,
Nick.

Does anybody know if there is a way to tell AGS to to set the alpha bit in a pixel to 255 when that pixel was rendered, rather than leaving the alpha byte empty when in 32bit colour mode ?
I am attempting to copy each layer of the AGS display out onto separate textures so that I can do post-render effects on each of the layers individualy.
So, for instance I let AGS render the background, I then memcpy the scanlines from AGS frame buffer into my textures, and then memset the whole AGS framebuffer area to 0's. This is to make AGS then render the Sprites onto a clean surface. I can then repeat this procedure once the sprites are rendered, then the GUI and finaly the mouse cursor, leaving me with a seperate texture for each layer, that I can do my effects with and finaly render them myself.
However, when AGS goes on to render the sprites, it will write the RGB values into its frame-buffer, but it will leave the 4th byte of every pixel as 0 (the alpha value). This means when I memcpy the scanlines for the sprites they have 0 alpha. I need my spritelayer to have alpha of 0 where nothing was drawn (the memset after the background does this), however I also need the pixels that were drawn by the sprites to have an alpha value of 255.
I can check myself if RGB exist and then set the alpha-byte myselfe, otherwise leave it as 0, however doing this means i have to check for RGB in every pixel and copy it accordingly, meaning that I cant memcopy entire scanlines which makes the whole thing too slow to be of any use.
But if the Alpha bit was filled by AGS, then I could memcpy every scanline in an acceptable time.
Any ideas would be greatly appreciated.
Cheers,
Nick.