i'm working with C# and OpenTK libraries for OpenGL, i want to blend a GLControl with the picturebox placed as background.
* EDIT *
i solved the problem loading source image by changing method, so now i use bitmap and bitmapdata structures:
Bitmap bitmap = new Bitmap("image.png");
BitmapData data = bitmap.LockBits(new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height),
ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
i'm sure that my png source has 4 channels and alpha value is 0 on black background
this is the original image: http://imageshack.com/a/img801/517/u2z8.png
And this is the problem: http://imageshack.com/a/img40/1729/zezj.jpg
top is the texture using GLControl and bottom is a Picturebox of Windows Form, what i'm trying to do is that black background of GLControl becomes transparent.
I put Blend cap enable and use GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
so i think that's not the problem.
Maybe the problem is on texture environment?
GL.TexEnv(TextureEnvTarget.TextureEnv, TextureEnvParameter.TextureEnvMode,GL_MODULATE);