Hi I'm trying to change from Cairo (2D Vector image library) to NanoVG. I'm using C#, openTK and Nano.VG.NET to make my game.
I'm having issues with alpha? Transparency/Blending is an issue…
Here is an output
Without NanoVG Overlay :
With NanoVG Overlay :
I think it has to do with blending or the nano shader….Not sure. Does anyone knows how to solve this?
My OpenGL Initialization :
GL.DrawBuffer (DrawBufferMode.Back); GL.Disable (EnableCap.Lighting); GL.Enable (EnableCap.Texture2D); GL.Disable (EnableCap.Multisample); GL.Disable (EnableCap.SampleAlphaToCoverage); GL.Disable (EnableCap.AlphaTest); GL.DepthFunc (DepthFunction.Lequal); GL.Enable (EnableCap.DepthTest); GL.Disable (EnableCap.ScissorTest); GL.Enable ( EnableCap.TextureRectangle); GL.Enable (EnableCap.Blend); GL.BlendFunc (BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);