当前位置: 首页>>代码示例>>C#>>正文


C# GraphicFactory.ReleaseAsset方法代码示例

本文整理汇总了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);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:21,代码来源:IAnimatedModel.cs

示例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();
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:13,代码来源:ISoundEmitter3D.cs

示例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();
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:18,代码来源:ExtractXmlModelLoader.cs

示例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;
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:36,代码来源:TextureInformation.cs

示例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();
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:12,代码来源:SimpleSoundEffect.cs

示例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();
                    }
                }
            }
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:36,代码来源:IModelo.cs


注:本文中的GraphicFactory.ReleaseAsset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。