I enabled and setup glBlendFunc, but my texture has a white outline. What am I doing wrong?

Posted by vinzBad on Game Development See other posts from Game Development or by vinzBad
Published on 2012-11-20T19:16:40Z Indexed on 2012/11/20 23:24 UTC
Read the original article Hit count: 234

Filed under:
|
|

You can see most of my source code in this question: Instead of the specified Texture, black circles on a green background are getting rendered. Why?

Now I have the problem, that my texture has a white outline on its transparent parts. After googling and setting up glBlendFunc, the outline just got "softer".

This is how it looks like:

Teh bug

This is how I now setup OpenGL:

    public static void SetupGL()
    {
        GL.Enable(EnableCap.Blend);
        GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);

        GL.Enable(EnableCap.Texture2D);
        GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest);

    }

© Game Development or respective owner

Related posts about c#

Related posts about opengl