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
|
|
@ -15,8 +15,6 @@
|
||||||
#include "VulkanBuffer.hpp"
|
#include "VulkanBuffer.hpp"
|
||||||
|
|
||||||
namespace vks
|
namespace vks
|
||||||
{
|
|
||||||
namespace utils
|
|
||||||
{
|
{
|
||||||
class HeightMap
|
class HeightMap
|
||||||
{
|
{
|
||||||
|
|
@ -254,4 +252,3 @@ namespace vks
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ public:
|
||||||
vks::Texture2D source;
|
vks::Texture2D source;
|
||||||
} textures;
|
} textures;
|
||||||
|
|
||||||
vks::utils::HeightMap *heightMap = nullptr;
|
vks::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 vks::utils::HeightMap(vulkanDevice, queue);
|
heightMap = new vks::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), 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
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Base", "Base", "{09B9A54B-F
|
||||||
base\vulkanexamplebase.cpp = base\vulkanexamplebase.cpp
|
base\vulkanexamplebase.cpp = base\vulkanexamplebase.cpp
|
||||||
base\vulkanexamplebase.h = base\vulkanexamplebase.h
|
base\vulkanexamplebase.h = base\vulkanexamplebase.h
|
||||||
base\VulkanFrameBuffer.hpp = base\VulkanFrameBuffer.hpp
|
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\VulkanInitializers.hpp = base\VulkanInitializers.hpp
|
||||||
base\VulkanModel.hpp = base\VulkanModel.hpp
|
base\VulkanModel.hpp = base\VulkanModel.hpp
|
||||||
base\vulkanswapchain.hpp = base\vulkanswapchain.hpp
|
base\vulkanswapchain.hpp = base\vulkanswapchain.hpp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue