luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
568 stars 108 forks source link

Update from 0.61 -> 0.7 causes textures display alpha pixels as black #82

Closed matyasforian closed 6 years ago

matyasforian commented 6 years ago

In my project what I updated to 0.7 the transparent textures were no longer transparent, instead rendered in black (on Windows, using OpenGL.NET & OpenGL.Winforms). Did you change anything related to this?

Heres my project: https://github.com/fmotagarcia/sparrow-sharp/tree/starling_201

matyasforian commented 6 years ago

Nvm I figured it out. I think OpenGL.NET activated the correct blend mode at startup before, now I had to do it manually.

luca-piccioni commented 6 years ago

I exclude that OpenGL.Net or OpenGL.Net.WinForms are modifying the initial GL state (no call to Gl.Enable of Gl.Disable). If I remember correctly, blending is disabled at GL context creation, indeed it is correct to enable it if you need it.