Moved heightmap to vks namespace (Refs #260)

This commit is contained in:
saschawillems 2017-02-12 13:32:50 +01:00
parent c1575e4fe5
commit 7f1c376550
2 changed files with 184 additions and 181 deletions

View file

@ -14,8 +14,10 @@
#include "VulkanDevice.hpp"
#include "VulkanBuffer.hpp"
namespace vkTools
namespace vks
{
namespace utils
{
class HeightMap
{
private:
@ -251,4 +253,5 @@ namespace vkTools
vkFreeMemory(device->logicalDevice, indexStaging.memory, nullptr);
}
};
}
}

View file

@ -197,7 +197,7 @@ public:
vks::Texture2D source;
} textures;
vkTools::HeightMap *heightMap = nullptr;
vks::utils::HeightMap *heightMap = nullptr;
struct {
VkPipelineVertexInputStateCreateInfo inputState;
@ -660,11 +660,11 @@ public:
// Generate a terrain quad patch for feeding to the tessellation control shader
void generateTerrain()
{
heightMap = new vkTools::HeightMap(vulkanDevice, queue);
heightMap = new vks::utils::HeightMap(vulkanDevice, queue);
#if defined(__ANDROID__)
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vkTools::HeightMap::topologyTriangles, androidApp->activity->assetManager);
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vks::utils::HeightMap::topologyTriangles, androidApp->activity->assetManager);
#else
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vkTools::HeightMap::topologyTriangles);
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vks::utils::HeightMap::topologyTriangles);
#endif
}