示例#1
0
 private void checkListenerCreated()
 {
     if (renderTargetListener == null)
     {
         renderTargetListener = new RenderTargetListener();
         RenderTarget_addListener(renderTarget, renderTargetListener.Ptr);
     }
 }
示例#2
0
 private void checkDestroyListener(bool forceDelete = false)
 {
     if (renderTargetListener != null && (forceDelete || !renderTargetListener.HasSubscribers))
     {
         RenderTarget_removeListener(renderTarget, renderTargetListener.Ptr);
         renderTargetListener.Dispose();
         renderTargetListener = null;
     }
 }
 public IntPtr create(RenderTargetListener obj)
 {
     handle = GCHandle.Alloc(obj);
     return(ManagedRenderTargetListener_Create(preRenderTargetUpdateCb, postRenderTargetUpdateCb, preViewportUpdateCb, postViewportUpdateCb, viewportAddedCb, viewportRemovedCb, GCHandle.ToIntPtr(handle)));
 }