예제 #1
0
파일: main.cs 프로젝트: jpbruyere/vke.net
 //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;
     }
 }
예제 #2
0
 //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;
     }
 }