public static GlTextureInfo GlTextureInfoFor(this GpuBufferFormat gpuBufferFormat, int plane) { var ptr = UnsafeNativeMethods.MpGlTextureInfoForGpuBufferFormat((UInt32)gpuBufferFormat, plane); var info = Marshal.PtrToStructure <GlTextureInfo>(ptr); UnsafeNativeMethods.MpGlTextureInfoDestroy(ptr); return(info); }
protected override void Dispose(bool disposing) { if (_disposed) { return; } if (OwnsResource()) { UnsafeNativeMethods.MpGlTextureInfoDestroy(ptr); } ptr = IntPtr.Zero; _disposed = true; }