Пример #1
0
        void loadAssets()
        {
            // The original sample uses "plane.obj". The version of Assimp being used here does not properly load this file for some reason.
            // I've converted it into a Collada file which is loaded correctly.
            models_plane.loadFromFile(getAssetPath() + "models/plane2.dae", vertexLayout, 0.5f, vulkanDevice, queue);
            models_example.loadFromFile(getAssetPath() + "models/chinesedragon.dae", vertexLayout, 0.3f, vulkanDevice, queue);

            // Textures
            if (vulkanDevice.features.textureCompressionBC)
            {
                textures_colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_bc3_unorm.ktx", VK_FORMAT_BC3_UNORM_BLOCK, vulkanDevice, queue);
            }
            else if (vulkanDevice.features.textureCompressionASTC_LDR)
            {
                textures_colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_astc_8x8_unorm.ktx", VK_FORMAT_ASTC_8x8_UNORM_BLOCK, vulkanDevice, queue);
            }
            else if (vulkanDevice.features.textureCompressionETC2)
            {
                textures_colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, vulkanDevice, queue);
            }
            else
            {
                throw new InvalidOperationException("Device does not support any compressed texture format!");
            }
        }
Пример #2
0
 void loadMeshes()
 {
     // Skybox
     models_skybox.loadFromFile(getAssetPath() + "models/cube.obj", vertexLayout, 0.05f, vulkanDevice, queue);
     // Objects
     List<string> filenames = new List<string> { "sphere.obj", "teapot.dae", "torusknot.obj" };
     foreach (string file in filenames)
     {
         vksModel model = new vksModel();
         model.loadFromFile(getAssetPath() + "models/" + file, vertexLayout, 0.05f, vulkanDevice, queue);
         models_objects.Add(model);
     }
 }
Пример #3
0
 void loadAssets()
 {
     models_example.loadFromFile(getAssetPath() + "models/glowsphere.dae", vertexLayout, 0.05f, vulkanDevice, queue);
     textures_gradient.loadFromFile(getAssetPath() + "textures/particle_gradient_rgba.ktx", VK_FORMAT_R8G8B8A8_UNORM, vulkanDevice, queue);
 }
Пример #4
0
 void loadAssets()
 {
     models_cube.loadFromFile(getAssetPath() + "models/treasure_smooth.dae", vertexLayout, 1.0f, VulkanDevice, Queue);
 }
 void loadAssets()
 {
     models_cube.loadFromFile(getAssetPath() + "models/color_teapot_spheres.dae", vertexLayout, 0.1f, vulkanDevice, queue);
     textures_colormap.loadFromFile(getAssetPath() + "textures/metalplate_nomips_rgba.ktx", VK_FORMAT_R8G8B8A8_UNORM, vulkanDevice, queue);
 }
Пример #6
0
 void loadAssets()
 {
     models_scene.loadFromFile(getAssetPath() + "models/samplescene.dae", vertexLayout, 0.35f, vulkanDevice, queue);
 }