Removed no longer used textures
This commit is contained in:
parent
aa9f2405dd
commit
ea61df3b55
4 changed files with 5 additions and 39 deletions
|
|
@ -7,12 +7,11 @@ if %ERRORLEVEL% EQU 0 (
|
||||||
mkdir "assets\shaders\base"
|
mkdir "assets\shaders\base"
|
||||||
xcopy "..\..\data\shaders\base\*.spv" "assets\shaders\base" /Y
|
xcopy "..\..\data\shaders\base\*.spv" "assets\shaders\base" /Y
|
||||||
|
|
||||||
|
|
||||||
mkdir "assets\shaders\pipelines"
|
mkdir "assets\shaders\pipelines"
|
||||||
xcopy "..\..\data\shaders\pipelines\*.spv" "assets\shaders\pipelines" /Y
|
xcopy "..\..\data\shaders\pipelines\*.spv" "assets\shaders\pipelines" /Y
|
||||||
|
|
||||||
mkdir "assets\textures"
|
mkdir "assets\models"
|
||||||
xcopy "..\..\data\textures\crate_bc3.ktx" "assets\textures" /Y
|
xcopy "..\..\data\models\treasure_smooth.dae" "assets\models" /Y
|
||||||
|
|
||||||
mkdir "res\drawable"
|
mkdir "res\drawable"
|
||||||
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
xcopy "..\..\android\images\icon.png" "res\drawable" /Y
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -34,8 +34,6 @@ std::vector<vkMeshLoader::VertexLayout> vertexLayout =
|
||||||
|
|
||||||
class VulkanExample: public VulkanExampleBase
|
class VulkanExample: public VulkanExampleBase
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
vkTools::VulkanTexture textureColorMap;
|
|
||||||
public:
|
public:
|
||||||
struct {
|
struct {
|
||||||
VkPipelineVertexInputStateCreateInfo inputState;
|
VkPipelineVertexInputStateCreateInfo inputState;
|
||||||
|
|
@ -92,16 +90,6 @@ public:
|
||||||
|
|
||||||
vkDestroyBuffer(device, uniformDataVS.buffer, nullptr);
|
vkDestroyBuffer(device, uniformDataVS.buffer, nullptr);
|
||||||
vkFreeMemory(device, uniformDataVS.memory, nullptr);
|
vkFreeMemory(device, uniformDataVS.memory, nullptr);
|
||||||
|
|
||||||
textureLoader->destroyTexture(textureColorMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
void loadTextures()
|
|
||||||
{
|
|
||||||
textureLoader->loadTexture(
|
|
||||||
getAssetPath() + "textures/crate_bc3.ktx",
|
|
||||||
VK_FORMAT_BC3_UNORM_BLOCK,
|
|
||||||
&textureColorMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void buildCommandBuffers()
|
void buildCommandBuffers()
|
||||||
|
|
@ -227,11 +215,9 @@ public:
|
||||||
|
|
||||||
void setupDescriptorPool()
|
void setupDescriptorPool()
|
||||||
{
|
{
|
||||||
// Example uses one ubo and one combined image sampler
|
|
||||||
std::vector<VkDescriptorPoolSize> poolSizes =
|
std::vector<VkDescriptorPoolSize> poolSizes =
|
||||||
{
|
{
|
||||||
vkTools::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1),
|
vkTools::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1)
|
||||||
vkTools::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VkDescriptorPoolCreateInfo descriptorPoolInfo =
|
VkDescriptorPoolCreateInfo descriptorPoolInfo =
|
||||||
|
|
@ -251,12 +237,7 @@ public:
|
||||||
vkTools::initializers::descriptorSetLayoutBinding(
|
vkTools::initializers::descriptorSetLayoutBinding(
|
||||||
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
||||||
VK_SHADER_STAGE_VERTEX_BIT,
|
VK_SHADER_STAGE_VERTEX_BIT,
|
||||||
0),
|
0)
|
||||||
// Binding 1 : Fragment shader image sampler
|
|
||||||
vkTools::initializers::descriptorSetLayoutBinding(
|
|
||||||
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
|
|
||||||
VK_SHADER_STAGE_FRAGMENT_BIT,
|
|
||||||
1),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VkDescriptorSetLayoutCreateInfo descriptorLayout =
|
VkDescriptorSetLayoutCreateInfo descriptorLayout =
|
||||||
|
|
@ -284,13 +265,6 @@ public:
|
||||||
|
|
||||||
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet));
|
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &allocInfo, &descriptorSet));
|
||||||
|
|
||||||
// Color map image descriptor
|
|
||||||
VkDescriptorImageInfo texDescriptorColorMap =
|
|
||||||
vkTools::initializers::descriptorImageInfo(
|
|
||||||
textureColorMap.sampler,
|
|
||||||
textureColorMap.view,
|
|
||||||
VK_IMAGE_LAYOUT_GENERAL);
|
|
||||||
|
|
||||||
std::vector<VkWriteDescriptorSet> writeDescriptorSets =
|
std::vector<VkWriteDescriptorSet> writeDescriptorSets =
|
||||||
{
|
{
|
||||||
// Binding 0 : Vertex shader uniform buffer
|
// Binding 0 : Vertex shader uniform buffer
|
||||||
|
|
@ -298,13 +272,7 @@ public:
|
||||||
descriptorSet,
|
descriptorSet,
|
||||||
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
|
||||||
0,
|
0,
|
||||||
&uniformDataVS.descriptor),
|
&uniformDataVS.descriptor)
|
||||||
// Binding 1 : Fragment shader image sampler
|
|
||||||
vkTools::initializers::writeDescriptorSet(
|
|
||||||
descriptorSet,
|
|
||||||
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
|
|
||||||
1,
|
|
||||||
&texDescriptorColorMap)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);
|
vkUpdateDescriptorSets(device, writeDescriptorSets.size(), writeDescriptorSets.data(), 0, NULL);
|
||||||
|
|
@ -463,7 +431,6 @@ public:
|
||||||
void prepare()
|
void prepare()
|
||||||
{
|
{
|
||||||
VulkanExampleBase::prepare();
|
VulkanExampleBase::prepare();
|
||||||
loadTextures();
|
|
||||||
loadMeshes();
|
loadMeshes();
|
||||||
setupVertexDescriptions();
|
setupVertexDescriptions();
|
||||||
prepareUniformBuffers();
|
prepareUniformBuffers();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue