private void checkListenerCreated() { if (renderTargetListener == null) { renderTargetListener = new RenderTargetListener(); RenderTarget_addListener(renderTarget, renderTargetListener.Ptr); } }
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))); }