Beispiel #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]);
        }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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];
		}
Beispiel #5
0
 public Texture FindTexture(string name)
 {
     return(additionalLibrary.FindTexture(name));
 }