public static GLTex AddTex(Texture tex) { GLTex gltex = GLTex.CreateGLTex(tex); textures.Add(tex, gltex); return(gltex); }
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); } }
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); } }