public void DisposeTex(IGeneratedTexture tex) { if (tex == null) { return; } if (tex is MyUserGeneratedTexture) { MyUserGeneratedTexture texture = (MyUserGeneratedTexture)tex; texture.Dispose(); m_objectsPoolGenerated.Deallocate(texture); tex = null; } else if (tex is MyGeneratedTextureFromPattern) { MyGeneratedTextureFromPattern texture = (MyGeneratedTextureFromPattern)tex; texture.Dispose(); m_objectsPoolGeneratedFromPattern.Deallocate(texture); tex = null; } else { MyRenderProxy.Assert(false, "It is disposed texture that does not belong to this manager"); } }
public void Unload() { m_listSubresourceFilenames.Clear(); m_objectsPoolOfStringLists.Deallocate(m_listSubresourceFilenames); m_listSubresourceFilenames = null; TextureFormat = Format.Unknown; }
internal static void Commit(MyLinesBatch batch) { batch.VertexCount = batch.List.Count; batch.StartVertex = m_vertices.Count; if (batch.VertexCount > 0) { m_batches.Add(batch); m_vertices.AddList(batch.List); batch.List.Clear(); } else { m_batchesPool.Deallocate(batch); } }
public static void Deallocate(CellData cell) { using (m_lock.AcquireExclusiveUsing()) { m_pool.Deallocate(cell); } }
public void DisposeCsm(ICascadeShadowMap csm) { MyCascadeShadowMap myCsm = (MyCascadeShadowMap)csm; MyRenderProxy.Assert(!m_objectsPoolCsm.Active.Contains(myCsm), "Shadowmap is not active, maybe it is disposed already."); myCsm.Destroy(); m_objectsPoolCsm.Deallocate(myCsm); }
public void DisposeSingleShadowmap(ISingleShadowmap shadowmap) { MySingleShadowmap myShadowmap = (MySingleShadowmap)shadowmap; MyRenderProxy.Assert(!m_objectsPoolSingleShadowmap.Active.Contains(myShadowmap), "Shadowmap is not active, maybe it is disposed already."); myShadowmap.Destroy(); m_objectsPoolSingleShadowmap.Deallocate(myShadowmap); }
public static void RemoveLight(MyLight light) { if (light != null) { light.Clear(); m_preallocatedLights.Deallocate(light); } }
public static void RemoveLight(MyLight light) { if (light.ProxyId != MyDynamicAABBTree.NullNode) // Has been added { m_tree.RemoveProxy(light.ProxyId); } light.Clear(); m_preallocatedLights.Deallocate(light); }
private void OnComplete() { MySimpleProfiler.Begin("MyOreDetectorComponent - OnComplete"); CompletionCallback(this, m_result, m_emptyCells); CompletionCallback = null; //m_result = null; m_instancePool.Deallocate(this); MySimpleProfiler.End(); }
void DisposeTexture(MyBorrowedDepthStencilTexture depthStencil) { IDepthStencil customTexture = depthStencil.DepthStencilTexture; MyManagers.DepthStencils.DisposeTex(ref customTexture); MyBorrowedTextureKey key = depthStencil.Key; m_dictionaryDepthStencilTextures[key].Remove(depthStencil); m_objectPoolDepthStencil.Deallocate(depthStencil); }
void DisposeTexture(MyBorrowedCustomTexture custom) { ICustomTexture customTexture = custom.CustomTexture; MyManagers.CustomTextures.DisposeTex(ref customTexture); MyBorrowedTextureKey key = custom.Key; m_dictionaryCustomTextures[key].Remove(custom); m_objectPoolCustom.Deallocate(custom); }
void DisposeTexture(MyBorrowedUavTexture uav) { IUavTexture uavTexture = uav.UavTexture; MyManagers.RwTextures.DisposeTex(ref uavTexture); MyBorrowedTextureKey key = uav.Key; m_dictionaryUavTextures[key].Remove(uav); m_objectPoolUav.Deallocate(uav); }
void DisposeTexture(MyBorrowedRtvTexture rtv) { IRtvTexture rtvTexture = rtv.RtvTexture; MyManagers.RwTextures.DisposeTex(ref rtvTexture); MyBorrowedTextureKey key = rtv.Key; m_dictionaryRtvTextures[key].Remove(rtv); m_objectPoolRtv.Deallocate(rtv); }
public static void RemoveLight(MyLight light) { if (light != null) { light.Clear(); //by Gregory: added null check happened once when unloading session if (m_preallocatedLights != null) { m_preallocatedLights.Deallocate(light); } } }
public void DisposeTex(ref IDynamicFileArrayTexture inTex) { if (inTex == null) { return; } MyDynamicFileArrayTexture tex = (MyDynamicFileArrayTexture)inTex; //if (m_texarraysAutodestroyed.Contains(tex)) // m_texarraysAutodestroyed.Remove(tex); tex.Release(); m_objectsPool.Deallocate(tex); inTex = null; }
public void Update() { IntPtr cuePtr; while (PopDestroyList(out cuePtr)) { var xactCue = new Cue(cuePtr); var cue = GetCueByPointer(cuePtr); m_activeCues.Remove(cuePtr.ToInt64()); cue.OnRelease(); m_pool.Deallocate(cue); xactCue.Destroy(); } }
public void DisposeTex(ref ICustomTexture texture) { if (texture == null) { return; } MyCustomTexture textureInternal = (MyCustomTexture)texture; if (m_isDeviceInit) { textureInternal.OnDeviceEnd(); } m_objectsPool.Deallocate(textureInternal); }
internal void DisposeTex(ref IDepthStencil tex) { if (tex == null) { return; } MyDepthStencil texture = (MyDepthStencil)tex; if (m_isDeviceInit) { texture.OnDeviceEnd(); } m_objectsPool.Deallocate(texture); }
internal void DisposeTex(ref IDepthArrayTexture texture) { if (texture == null) { return; } MyDepthArrayTexture castedTexture = (MyDepthArrayTexture)texture; if (m_isDeviceInit) { castedTexture.OnDeviceEnd(); } m_depthArrays.Deallocate(castedTexture); texture = null; }
public void DisposeTex(ref IDepthTexture texture) { if (texture == null) { return; } MyDepthTexture textureInternal = (MyDepthTexture)texture; if (m_isDeviceInit) { textureInternal.OnDeviceEnd(); } m_depthTextures.Deallocate(textureInternal); texture = null; }
public void DisposeTex(ref IFileArrayTexture texture) { if (texture == null) { return; } MyFileArrayTexture textureInternal = (MyFileArrayTexture)texture; if (m_isDeviceInit) { textureInternal.OnDeviceEnd(); } m_fileTextureArrays.Deallocate(textureInternal); texture = null; }
public void DisposeTex(ref IUavTexture texture) { if (texture == null) { return; } MyUavTexture textureInternal = (MyUavTexture)texture; if (m_isDeviceInit) { textureInternal.OnDeviceEnd(); } m_uavTextures.Deallocate(textureInternal); m_statistics.Remove(textureInternal); texture = null; }
public void DisposeTex(ref IFileArrayTexture texture) { if (texture == null) { return; } MyFileArrayTexture textureInternal = (MyFileArrayTexture)texture; if (m_isDeviceInit) { textureInternal.OnDeviceEnd(); } if (m_texturesOnAutoDisposal.Contains(textureInternal)) { m_texturesOnAutoDisposal.Remove(textureInternal); } m_fileTextureArrays.Deallocate(textureInternal); texture = null; }
internal static void Remove(MyCullProxy proxy) { m_cullProxyPool.Deallocate(proxy); }
internal static void Deallocate(T item) { item.Destruct(); m_pool.Deallocate(item); }
public static void DeallocateAnimatedParticle(MyAnimatedParticle particle) { m_animatedParticles.Deallocate(particle); }
internal static void Remove(MyRenderableProxy proxy) { m_rendrableProxyPool.Deallocate(proxy); }
internal static void Free(MyCullProxy_2 o) { Pool.Deallocate(o); }
internal static void Destroy(MyActor item) { item.Destruct(); m_pool.Deallocate(item); }
public static void Remove(MyMissile missile) { m_missiles.Deallocate(missile); }