From 5bc68c75d64a0858f2bfcfc9832ba5559a55f7ac Mon Sep 17 00:00:00 2001 From: homuler Date: Mon, 14 Dec 2020 21:49:38 +0900 Subject: [PATCH] fix(sdk): set GlTextureBuffer's shared pointer --- Assets/MediaPipe/SDK/Scripts/Gpu/GlTextureBuffer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/MediaPipe/SDK/Scripts/Gpu/GlTextureBuffer.cs b/Assets/MediaPipe/SDK/Scripts/Gpu/GlTextureBuffer.cs index 8d0cb4e09..dd7e9dbbc 100644 --- a/Assets/MediaPipe/SDK/Scripts/Gpu/GlTextureBuffer.cs +++ b/Assets/MediaPipe/SDK/Scripts/Gpu/GlTextureBuffer.cs @@ -21,7 +21,8 @@ public GlTextureBuffer(UInt32 target, UInt32 name, int width, int height, UnsafeNativeMethods.mp_SharedGlTextureBuffer__ui_ui_i_i_ui_PF_PSgc( target, name, width, height, format, callback, sharedContextPtr, out var ptr).Assert(); - this.ptr = ptr; + sharedPtrHandle = new SharedPtr(ptr); + this.ptr = sharedPtrHandle.Get(); } public GlTextureBuffer(UInt32 name, int width, int height, GpuBufferFormat format, DeletionCallback callback, GlContext glContext = null) :