2
을 그릴하지만 난 단지이 얻을 : OpenTK 나는 C#에서 OpenGL을 간단한 원을 그리려는 투명 원
내가 혼합 기능을 시도하지만, 일을하지 않았다. 내 코드는 : 당신이 투명 원을 그리려는 경우GL.Color4
을 설정할 때
public static void DrawCircle(float x, float y, float radius, Color4 c)
{
GL.Enable(EnableCap.Blend);
GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
GL.Begin(PrimitiveType.TriangleFan);
GL.Color4(c);
GL.Vertex2(x, y);
for (int i = 0; i < 360; i++)
{
GL.Vertex2(x + Math.Cos(i) * radius, y + Math.Sin(i) * radius);
}
GL.End();
GL.Disable(EnableCap.Blend);
}
어떻게 생겼습니까? 구멍? – TaW