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