예제 #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
 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));
 }