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,7 +14,9 @@
#include "VulkanDevice.hpp" #include "VulkanDevice.hpp"
#include "VulkanBuffer.hpp" #include "VulkanBuffer.hpp"
namespace vkTools namespace vks
{
namespace utils
{ {
class HeightMap class HeightMap
{ {
@ -252,3 +254,4 @@ namespace vkTools
} }
}; };
} }
}

View file

@ -197,7 +197,7 @@ public:
vks::Texture2D source; vks::Texture2D source;
} textures; } textures;
vkTools::HeightMap *heightMap = nullptr; vks::utils::HeightMap *heightMap = nullptr;
struct { struct {
VkPipelineVertexInputStateCreateInfo inputState; VkPipelineVertexInputStateCreateInfo inputState;
@ -660,11 +660,11 @@ public:
// Generate a terrain quad patch for feeding to the tessellation control shader // Generate a terrain quad patch for feeding to the tessellation control shader
void generateTerrain() void generateTerrain()
{ {
heightMap = new vkTools::HeightMap(vulkanDevice, queue); heightMap = new vks::utils::HeightMap(vulkanDevice, queue);
#if defined(__ANDROID__) #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 #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 #endif
} }