' completely clear out values in buffer, as I rely upon Alpha channel
GL.glClearcolor(0,0,0,0)
GL.glClear(GL.GL10_COLOR_BUFFER_BIT)
Batch.Begin
GL.glColorMask(False, False, False, True)
' Mask is 100% blank (transparent,alpha=0) on left 50% of screen and 100% white on right 50% of screen (alpha=1)
Batch.SetBlendFunction(GL.GL10_ONE, GL.GL10_ZERO)
Batch.DrawTex2(Mask, 0, 0, vpW, vpH)
Batch.End
' now draw my texture, expecting to only see the right half of the texture,
' because the alpha should equal 0 on the left of the screen and 1 on the right,
' so I expect the left of the screen to be masked
Batch.SetBlendFunction(GL.GL10_DST_ALPHA, GL.GL10_ZERO)
Batch,Begin
Batch.DrawRegion3(MyTextureRegion, vpW * 0.5f - MyTexture.Width * 0.1f, vpH * 0.5f - MyTexture.Height * 0.1f, MyTexture.Width * 0.1f, MyTexture.Height * 0.1f, _
MyTexture.Width * 0.2f, MyTexture.Height * 0.2f, 1.0f, 1.0f, CarAngle)
Batch.End