private DestroySurface ( |
||
dpy | ||
surface | ||
return | int |
public unsafe override void Dispose() { if (disposed) { return; } disposed = true; disposeChilderen(); #if NaCl PPAPI.StopSwapBufferLoop(); #endif if (dc != IntPtr.Zero) { DisableContext(); } #if WIN32 if (dc != IntPtr.Zero) { if (ctx != IntPtr.Zero) { WGL.DeleteContext(ctx); ctx = IntPtr.Zero; } if (handle != IntPtr.Zero) { WGL.ReleaseDC(handle, dc); handle = IntPtr.Zero; } dc = IntPtr.Zero; } #endif #if RPI if (dc != IntPtr.Zero) { if (surface != IntPtr.Zero) { EGL.DestroySurface(dc, surface); } if (ctx != IntPtr.Zero) { EGL.DestroyContext(dc, ctx); } EGL.Terminate(dc); dc = IntPtr.Zero; } RaspberryPi.bcm_host_deinit(); windowHandle.Free(); #elif LINUX if (dc != IntPtr.Zero) { if (ctx != IntPtr.Zero) { GLX.DestroyContext(dc, ctx); ctx = IntPtr.Zero; } X11.XCloseDisplay(dc); dc = IntPtr.Zero; } #endif #if OSX if (dc != IntPtr.Zero) { if (ctx != IntPtr.Zero) { CGL.DestroyContext(ctx); ctx = IntPtr.Zero; } CGL.ReleaseAllDisplays(); dc = IntPtr.Zero; } #endif base.Dispose(); }