public void OnShow() { _contextPtr = OpenGl.GlXCreateContext(_window.NativeHandle, ref _visualInfo, IntPtr.Zero, true); OpenGl.GlXMakeCurrent(_window.NativeHandle, _window.WindowId, _contextPtr); WindowExtensions.LoadDefaultOpenGLFunctions(); }
public void Cleanup() { OpenGl.GlXMakeCurrent(_window.NativeHandle, 0, IntPtr.Zero); OpenGl.GlXDestroyContext(_window.NativeHandle, _contextPtr); WindowExtensions.Cleanup(); }