//in the thread of the keyboard void loadTexture(string path) { try { if (path.EndsWith("ktx", StringComparison.OrdinalIgnoreCase)) { nextTexture = KTX.KTX.Load(presentQueue, cmdPool, path, VkImageUsageFlags.Sampled, VkMemoryPropertyFlags.DeviceLocal, true); } else { nextTexture = Image.Load(dev, path); } updateViewRequested = true; } catch (Exception ex) { Console.WriteLine(ex); nextTexture = null; } }
//in the thread of the keyboard void loadTexture(string path) { try { Console.WriteLine($"Loading:{path}"); if (path.EndsWith("ktx", StringComparison.OrdinalIgnoreCase)) { nextTexture = KTX.KTX.Load(presentQueue, cmdPool, path, VkImageUsageFlags.Sampled, imgProp, genMipMaps, tiling); } else { nextTexture = Image.Load(dev, presentQueue, cmdPool, path, VkFormat.R8g8b8a8Unorm, imgProp, tiling, genMipMaps); } updateViewRequested = true; } catch (Exception ex) { Console.WriteLine(ex); nextTexture = null; } }