コード例 #1
0
        public static GLTex AddTex(Texture tex)
        {
            GLTex gltex = GLTex.CreateGLTex(tex);

            textures.Add(tex, gltex);
            return(gltex);
        }
コード例 #2
0
 public static bool DeleteTex(GLTex tex)
 {
     if (textures.ContainsValue(tex) && textures.ContainsKey(tex.Data))
     {
         tex.Delete();
         textures.Remove(tex.Data);
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #3
0
        public static GLTex GetOrAddTex(Texture tex)
        {
            GLTex gltex;

            if (textures.TryGetValue(tex, out gltex))
            {
                return(gltex);
            }
            else
            {
                gltex = GLTex.CreateGLTex(tex);
                textures.Add(tex, gltex);
                return(gltex);
            }
        }