Exemplo n.º 1
0
        public GlTextureBuffer(UInt32 target, UInt32 name, int width, int height,
                               GpuBufferFormat format, DeletionCallback callback, MpGlContext glContext)
        {
            deletionCallbackHandle = GCHandle.Alloc(callback, GCHandleType.Pinned);
            ptr = UnsafeNativeMethods.MpGlTextureBufferCreate(
                target, name, width, height, (UInt32)format, Marshal.GetFunctionPointerForDelegate(callback), glContext);

            base.TakeOwnership(ptr);
        }