コード例 #1
0
        protected Texture2D GetTexture(int cacheidx, string tex)
        {
            if (tex == null)
            {
                return((Texture2D)Library.FindTexture(ResourceManager.NullTextureName));
            }
            if (textures[cacheidx] == null)
            {
                textures[cacheidx] = (Texture2D)Library.FindTexture(tex);
            }
            var tex2d = textures[cacheidx];

            if (tex2d.IsDisposed)
            {
                tex2d = textures[cacheidx] = (Texture2D)Library.FindTexture(tex);
            }
            return(textures[cacheidx]);
        }
コード例 #2
0
 public Texture FindTexture(string name)
 {
     //if (TextureLibrary != null)
     //{
     //Texture texture = TextureLibrary.FindTexture(name);
     //if (texture != null) return texture;
     //}
     if (additionalLibrary != null)
     {
         return(additionalLibrary.FindTexture(name));
     }
     return(null);
 }
コード例 #3
0
ファイル: DfmFile.cs プロジェクト: darkzter/Librelancer
 public Texture FindTexture(string name)
 {
     if (TextureLibrary != null)
     {
         Texture texture = TextureLibrary.FindTexture(name);
         if (texture != null)
         {
             return(texture);
         }
     }
     if (additionalLibrary != null)
     {
         return(additionalLibrary.FindTexture(name));
     }
     return(null);
 }
コード例 #4
0
		protected Texture2D GetTexture(int cacheidx, string tex)
		{
			if (tex == null)
				return (Texture2D)Library.FindTexture(ResourceManager.NullTextureName);
			if (textures[cacheidx] == null)
				textures[cacheidx] = (Texture2D)Library.FindTexture(tex);
			var tex2d = textures[cacheidx];
			if (tex2d.IsDisposed)
				tex2d = textures[cacheidx] = (Texture2D)Library.FindTexture(tex);
			return textures[cacheidx];
		}
コード例 #5
0
 public Texture FindTexture(string name)
 {
     return(additionalLibrary.FindTexture(name));
 }