if (!Textures.ContainsKey(path)) { try { Texture2D texture; if (Path.GetExtension(path) == ".ace") texture = MSTS.ACEFile.Texture2DFromFile(GraphicsDevice, path); else if (Path.GetExtension(path) == ".dds") DDSLib.DDSFromFile(path, GraphicsDevice, true, out texture); else return SharedMaterialManager.MissingTexture; Textures.Add(path, texture); Thread.Sleep(Viewer.Settings.LoadingDelay); return texture; } catch (InvalidDataException error)
This way I can load dds textured models. Of course I will not commit this change, just wanted to let you know...
Attached File(s)
-
DDS_support.zip (11.01K)
Number of downloads: 603