By the way, if you need more information on the a2drawimage issue, have a look at the Program Announcement thread:
http://forum.thegamecreators.com/?m=forum_view&t=179096&b=5&p=1
In post #6 on the second page Diggsey writes:
Quote: "
That's the expected output for what you've done. First of all you are drawing to a render target with an alpha channel, and then you're drawing to a render target (the backbuffer) which doesn't have an alpha channel. If you want them to look the same, create the render target without an alpha channel.
If you need an alpha channel:
First, don't expect the output to look the same as if you draw straight to a backbuffer. It's impossible because colour blending is not associative (ie. if + is the blending operation: color1 + (color2 + color3) is not usually the same as (color1 + color2) + color3.)
...
The problem is when drawing to a render-target that has alpha. Even if it has full alpha to begin with (which yours didn't since you cleared it to transparent, making the problem much worse), after drawing something semitransparent to it, it will no longer have full alpha (because the alpha channel is blended with the source's alpha channel just like any other colour channel)
It is possible to have a different blend mode for the alpha channel from the others but this plugin doesn't support that yet.
...
edit:
Updated the first post. Separate alpha blending is now possible.
"
Seems to describe your problem, right?
I haven't tested that feature yet (the separate alpha channel blending), so I'm not 100% sure how it works. The default settings for color blending are
a2setblendmode 5,6,1
as far as I know, where 5 and 6 refer to values from this list:
http://msdn.microsoft.com/en-us/library/bb172508.aspx and the 1 is an operator from this list:
http://msdn.microsoft.com/en-us/library/bb172509.aspx
So 5=Source Alpha, 6=Inverse Source Alpha, 1=Add, hence in this case the formula would be
Source Alpha*Source Color + Inverse Source Alpha*Destination Color, where
Source is the image you're rendering and
Destination is the render target or screen (Diggsey describes it pretty well in one of his posts).
The way I see it you'd keep those values the same (5,6,1), and to fix the alpha channel... well... to be honest I don't know. I need to think about this for a while.
Edit: I might be wrong... I'm really not an expert on this subject, but the way I see it, it's not possible with the given blend modes and operations. To achieve the exact same results as when drawing to the screen directly, you'd need more complex factors for source and destination color. While alpha blending would simply be achieved using 1*SrcAlpha + InvSrvAlpha*DestAlpha (hence with the parameters 2,6,1 (meaning "1", "InvSrcAlpha", "Add")), color blending would look somewhat like this:
(InvSrcAlpha*DestAlpha)/(SrcAlpha + InvSrcAlpha*DestAlpha) as factor #1 and SrcAlpha/(SrcAlpha + InvSrcAlpha*DestAlpha) as factor #2.
Maybe this could be achieved with multiple rendering passes though. Or maybe I'm completely overthinking this and it's actually quite easy, I don't know.