示例#1
0
 protected void MakeCurrent(IntPtr draw, IntPtr read)
 {
     if (NativeEgl.eglMakeCurrent(this.displayPointer, draw, read, this.ContextPointer) == NativeEgl.EGL_FALSE)
     {
         throw new PlatformGraphicsException(
                   "Could not set rendering context to current.", NativeEgl.eglGetError());
     }
 }
        protected override void Dispose(bool disposing)
        {
            if (this.isInitialized)
            {
                NativeEgl.eglMakeCurrent(this.display.DisplayPointer, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);

                if (NativeEgl.eglTerminate(this.display.DisplayPointer) == NativeEgl.EGL_FALSE)
                {
                    throw new PlatformGraphicsException(
                              "Failed to terminate egl display connection", NativeEgl.eglGetError());
                }
            }

            base.Dispose(disposing);
        }