luca-piccioni / OpenGL.Net

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

GlControl swallows exceptions in OnContextCreated #73

Closed matyasforian closed 6 years ago

matyasforian commented 6 years ago

Hi

I'm trying to use your excellent library but are having some difficulties setting it up. But I cant seem to catch the exception because of a catch-all block here: https://github.com/luca-piccioni/OpenGL.Net/blob/57799ba4c4570044c9e7c1d49ba1b0ae114a7f6d/OpenGL.Net.WinForms/GlControl.cs#L1001 (in OnContextCreated()). Would it be possible to remove this try-catch (or make it optional, I cant properly override OnContextCreated since _ContextCreated is private), I want to handle these errors myself.

Thanks