Moved heightmap to vks namespace (Refs #260)
This commit is contained in:
parent
7f1c376550
commit
88526730cb
3 changed files with 220 additions and 223 deletions
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
namespace vks
|
||||
{
|
||||
namespace utils
|
||||
{
|
||||
class HeightMap
|
||||
{
|
||||
private:
|
||||
|
|
@ -253,5 +251,4 @@ namespace vks
|
|||
vkFreeMemory(device->logicalDevice, indexStaging.memory, nullptr);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ public:
|
|||
vks::Texture2D source;
|
||||
} textures;
|
||||
|
||||
vks::utils::HeightMap *heightMap = nullptr;
|
||||
vks::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 vks::utils::HeightMap(vulkanDevice, queue);
|
||||
heightMap = new vks::HeightMap(vulkanDevice, queue);
|
||||
#if defined(__ANDROID__)
|
||||
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vks::utils::HeightMap::topologyTriangles, androidApp->activity->assetManager);
|
||||
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vks::HeightMap::topologyTriangles, androidApp->activity->assetManager);
|
||||
#else
|
||||
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vks::utils::HeightMap::topologyTriangles);
|
||||
heightMap->loadFromFile(getAssetPath() + "textures/terrain_heightmap_r16.ktx", 128, glm::vec3(2.0f, 48.0f, 2.0f), vks::HeightMap::topologyTriangles);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Base", "Base", "{09B9A54B-F
|
|||
base\vulkanexamplebase.cpp = base\vulkanexamplebase.cpp
|
||||
base\vulkanexamplebase.h = base\vulkanexamplebase.h
|
||||
base\VulkanFrameBuffer.hpp = base\VulkanFrameBuffer.hpp
|
||||
base\vulkanheightmap.hpp = base\vulkanheightmap.hpp
|
||||
base\VulkanHeightmap.hpp = base\VulkanHeightmap.hpp
|
||||
base\VulkanInitializers.hpp = base\VulkanInitializers.hpp
|
||||
base\VulkanModel.hpp = base\VulkanModel.hpp
|
||||
base\vulkanswapchain.hpp = base\vulkanswapchain.hpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue