Can I create an alpha channelled texture in code?

Blitz3D Forums/Blitz3D Programming/Can I create an alpha channelled texture in code?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Tex = CreateTexture(64,46,1+2)

Will create an alpha texture. You then need to set the alpha/color manually with Read/Write Pixels. Copyrecting from the backbuffer will not give you alpha, since the backbuffer has none.

You can use this to help.
Function GetRGBA(red,green,blue,alpha)
	Return blue Or (green Shl 8) Or (red Shl 16) Or (alpha Shl 24)
End Function