Use new Vulkan texture class (Refs #260)

This commit is contained in:
saschawillems 2017-02-09 21:55:35 +01:00
parent 83ad186ce5
commit 9822cde6e2
32 changed files with 232 additions and 273 deletions

View file

@ -24,6 +24,7 @@
#include <vulkan/vulkan.h>
#include "vulkanexamplebase.h"
#include "VulkanTexture.hpp"
#define VERTEX_BUFFER_BIND_ID 0
#define ENABLE_VALIDATION false
@ -76,7 +77,7 @@ public:
struct
{
vkTools::VulkanTexture skybox;
vks::TextureCubeMap skybox;
} textures;
struct {
@ -119,15 +120,12 @@ public:
mesh.indexBuffer.destroy();
}
textureLoader->destroyTexture(textures.skybox);
textures.skybox.destroy();
}
void loadTextures()
{
textureLoader->loadCubemap(
getAssetPath() + "textures/cubemap_vulkan.ktx",
VK_FORMAT_R8G8B8A8_UNORM,
&textures.skybox);
textures.skybox.loadFromFile(getAssetPath() + "textures/cubemap_vulkan.ktx", VK_FORMAT_R8G8B8A8_UNORM, vulkanDevice, queue);
}
void buildCommandBuffers()