How to grab the backbuffer *with* alpha

BlitzMax Forums/BlitzMax Programming/How to grab the backbuffer *with* alpha

You will also need a modified CLS color, this code seems to be working (after hacking BGL_ALPHABUFFER flag into Graphics()), although not absolutely sure of that:

Function SetClsColor2( red,green,blue,alpha=255 )
	glClearColor red/255.0,green/255.0,blue/255.0,alpha/255.0
End Function

Graphics 640,480,32

SetClsColor2 255,0,0,0

Cls

DrawLine 0,0,32,32
DrawLine 32,0,0,32
DrawOval 0,0,32,32

Local image=CreateImage(32,32,1,DYNAMIC_IMAGE)
GrabImage image,0,0

Cls
For Local i=1 To 100
	DrawImage image,rnd(640),rnd(480)
Next
Flip

WaitKey