本文整理汇总了C#中GraphicFactory.ReleaseAsset方法的典型用法代码示例。如果您正苦于以下问题:C# GraphicFactory.ReleaseAsset方法的具体用法?C# GraphicFactory.ReleaseAsset怎么用?C# GraphicFactory.ReleaseAsset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicFactory
的用法示例。
在下文中一共展示了GraphicFactory.ReleaseAsset方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CleanUp
/// <summary>
/// Cleans up the IModelo
/// </summary>
/// <param name="factory"></param>
public override void CleanUp(GraphicFactory factory)
{
for (int i = 0; i < MeshNumber; i++)
{
foreach (var item in TextureInformations[i])
{
factory.ReleaseAsset(item.DiffuseMapName);
factory.ReleaseAsset(item.BumpMapName);
factory.ReleaseAsset(item.GlowName);
factory.ReleaseAsset(item.SpecularMapName);
}
}
factory.ReleaseAsset(Name);
base.CleanUp(factory);
}
示例2: CleanUp
/// <summary>
/// Cleans up.
/// </summary>
/// <param name="factory">The factory.</param>
/// <param name="removeSoundGeneratorAlso">if set to <c>true</c> [remove sound generator also].</param>
public void CleanUp(GraphicFactory factory, bool removeSoundGeneratorAlso = true)
{
if (removeSoundGeneratorAlso)
{
factory.ReleaseAsset(internalName);
}
soundEngineInstance.Dispose();
}
示例3: CleanUp
/// <summary>
/// Cleans up.
/// </summary>
/// <param name="factory">The factory.</param>
public void CleanUp(GraphicFactory factory)
{
foreach (var item in modelNames)
{
factory.ReleaseAsset(item);
}
modelNames.Clear();
foreach (var item in texturesNames)
{
factory.ReleaseAsset(item);
}
texturesNames.Clear();
}
示例4: CleanUp
/// <summary>
/// Disposes all.
/// </summary>
/// <param name="factory">The factory.</param>
public void CleanUp(GraphicFactory factory)
{
if (bump != null)
factory.ReleaseAsset(BumpMapName);
if (specular != null)
factory.ReleaseAsset(_specularName);
if (diffuse != null)
factory.ReleaseAsset(DiffuseMapName);
if (glow != null)
factory.ReleaseAsset(_glowName);
if (heightMap != null)
factory.ReleaseAsset(HeightMapName);
if (multitexture1 != null)
factory.ReleaseAsset(MultiTexture1MapName);
if (multitexture2 != null)
factory.ReleaseAsset(MultiTexture2MapName);
if (multitexture3 != null)
factory.ReleaseAsset(MultiTexture3MapName);
if (multitexture4 != null)
factory.ReleaseAsset(MultiTexture4MapName);
isDisposed = true;
}
示例5: CleanUp
/// <summary>
/// Cleans up.
/// Not called by the engine
/// </summary>
/// <param name="factory">The factory.</param>
/// <param name="removeSoundGeneratorAlso">if set to <c>true</c> [remove sound generator also].</param>
public void CleanUp(GraphicFactory factory,bool removeSoundGeneratorAlso = true)
{
if(removeSoundGeneratorAlso)
factory.ReleaseAsset(internalName);
mySoundEffect.Dispose();
}
示例6: CleanUp
/// <summary>
/// Cleans up the IModelo
/// </summary>
public virtual void CleanUp(GraphicFactory factory)
{
factory.ReleaseAsset(Name);
for (int i = 0; i < MeshNumber; i++)
{
foreach (var item in TextureInformations[i])
{
factory.ReleaseAsset(item.DiffuseMapName);
factory.ReleaseAsset(item.BumpMapName);
factory.ReleaseAsset(item.GlowName);
factory.ReleaseAsset(item.SpecularMapName);
}
///Automatic handled
foreach (var item in BatchInformations[i])
{
if (item.VertexBuffer != null && item.VertexBuffer.IsDisposed == false)
{
item.VertexBuffer.Dispose();
}
if (item.IndexBuffer != null && item.IndexBuffer.IsDisposed == false)
{
item.IndexBuffer.Dispose();
}
if (item.InstancedVertexBuffer != null && item.InstancedVertexBuffer.IsDisposed == false)
{
item.InstancedVertexBuffer.Dispose();
}
}
}
}