I have some GDI code that's drawing semi-transparent triangles using System.Drawing.SolidBrush. I'm trying to reimplement the code using a proper 3D rendering API (OpenGL/Direct3D11), but I'm not sure what blend equation to use for these triangles to get the same output as the original GDI code.
I assume it's something relatively simple like additive blending (func=GL_FUNC_ADD, eq=GL_ONE,GL_ONE) or interpolation (func=GL_FUNC_ADD, eq=GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), but neither seems to look quite right. This is almost certainly to a bug in my new code, but I want to make sure I'm working towards the correct target before I continue. Does anybody know the appropriate blend equation?
EDIT: Here's the relevant C# code, stripped of context:
using System.Drawing;
SolidBrush b = new SolidBrush(Color.FromArgb(alpha,red,green,blue));
Point[] points = ...;
Graphics g;
g.FillPolygon(b,points);
My question is, what color will actually be written, in terms of the brush's RGBA and the destination pixel's RGBA? All the docs I can find just say "use alpha to control the Brush's transparency" or something equally vague; I'm curious what the actual blend equation is.