public static GLContext CreateContext(int[] attrs, GLContext share, IntPtr gdkDrawable) { if(!useWGLContext) { try { return new X11GLContext(attrs, (X11GLContext) share, gdkDrawable); } catch(DllNotFoundException e) { Console.WriteLine("Failed setting up X11 opengl context: " + e.Message); Console.WriteLine(e.StackTrace); Console.WriteLine("Trying win32 API"); useWGLContext = true; } return CreateContext(attrs, share, gdkDrawable); } else { return new W32GLContext(attrs, (W32GLContext) share, gdkDrawable); } }
public GLArea(int[] attributeList, GLArea share) { DoubleBuffered = false; context = GLContext.CreateContext (attributeList, share != null ? share.context : null, IntPtr.Zero); }
public GLArea(int[] attributeList) { DoubleBuffered = false; context = GLContext.CreateContext (attributeList, null, IntPtr.Zero); }