public void LoadTIXIntoVRAM(string tixPath) { Logger.Log()(LogLevel.INFO, $"Loading TIX from {tixPath} into virtual VRAM"); TIX tix; using (BinaryReader br = new BinaryReader(File.Open(tixPath, FileMode.Open))) { tix = new TIX(br); } Logger.Log()(LogLevel.INFO, $"Successfully loaded TIX"); foreach (var chunk in tix.Chunks) { foreach (var tim in chunk.TIMs) { var image = LibLSDUtil.GetImageDataFromTIM(tim); int actualXPos = (tim.PixelData.XPosition - 320) * 2; int actualYPos = 512 - tim.PixelData.YPosition - image.height; VRAMTexture.SubImage(image.data, actualXPos, actualYPos, image.width, image.height); } } VRAMLoaded = true; }
public void ClearVRAM() { VRAMTexture.Clear(); }