Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Updated for VS2019. Data path updated to find resources. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.vs
/Project/build
4 changes: 2 additions & 2 deletions Project/Common/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ namespace ApiWithoutSecrets {
}

void GUI::CreateGraphicsPipeline() {
vk::UniqueShaderModule vertex_shader_module = Parent.CreateShaderModule( "Data/Common/gui.vert.spv" );
vk::UniqueShaderModule fragment_shader_module = Parent.CreateShaderModule( "Data/Common/gui.frag.spv" );
vk::UniqueShaderModule vertex_shader_module = Parent.CreateShaderModule( "../Data/Common/gui.vert.spv" );
vk::UniqueShaderModule fragment_shader_module = Parent.CreateShaderModule( "../Data/Common/gui.frag.spv" );

std::vector<vk::PipelineShaderStageCreateInfo> shader_stage_create_infos = {
// Vertex shader
Expand Down
8 changes: 4 additions & 4 deletions Project/Samples/01 - Frame Resources Count/Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ namespace ApiWithoutSecrets {
// Background texture
{
int width = 0, height = 0, data_size = 0;
std::vector<char> texture_data = Tools::GetImageData( "Data/Common/Background.png", 4, &width, &height, nullptr, &data_size );
std::vector<char> texture_data = Tools::GetImageData( "../Data/Common/Background.png", 4, &width, &height, nullptr, &data_size );
// Create descriptor resources
{
Parameters.BackgroundTexture = SampleCommon::CreateImage( width, height, vk::Format::eR8G8B8A8Unorm, vk::ImageUsageFlagBits::eTransferDst | vk::ImageUsageFlagBits::eSampled, vk::MemoryPropertyFlagBits::eDeviceLocal, vk::ImageAspectFlagBits::eColor );
Expand Down Expand Up @@ -355,7 +355,7 @@ namespace ApiWithoutSecrets {
// Sample texture
{
int width = 0, height = 0, data_size = 0;
std::vector<char> texture_data = Tools::GetImageData( "Data/" PROJECT_NUMBER_STRING "/FrameResources.png", 4, &width, &height, nullptr, &data_size );
std::vector<char> texture_data = Tools::GetImageData( "../Data/" PROJECT_NUMBER_STRING "/FrameResources.png", 4, &width, &height, nullptr, &data_size );
// Create descriptor resources
{
Parameters.Texture = SampleCommon::CreateImage( width, height, vk::Format::eR8G8B8A8Unorm, vk::ImageUsageFlagBits::eTransferDst | vk::ImageUsageFlagBits::eSampled, vk::MemoryPropertyFlagBits::eDeviceLocal, vk::ImageAspectFlagBits::eColor );
Expand Down Expand Up @@ -396,8 +396,8 @@ namespace ApiWithoutSecrets {
}

void Sample::CreateGraphicsPipeline() {
vk::UniqueShaderModule vertex_shader_module = SampleCommon::CreateShaderModule( "Data/" PROJECT_NUMBER_STRING "/shader.vert.spv" );
vk::UniqueShaderModule fragment_shader_module = SampleCommon::CreateShaderModule( "Data/" PROJECT_NUMBER_STRING "/shader.frag.spv" );
vk::UniqueShaderModule vertex_shader_module = SampleCommon::CreateShaderModule( "../Data/" PROJECT_NUMBER_STRING "/shader.vert.spv" );
vk::UniqueShaderModule fragment_shader_module = SampleCommon::CreateShaderModule( "../Data/" PROJECT_NUMBER_STRING "/shader.frag.spv" );

std::vector<vk::PipelineShaderStageCreateInfo> shader_stage_create_infos = {
// Vertex shader
Expand Down
2 changes: 1 addition & 1 deletion Project/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo Preparing 'API without Secrets: The Practical Approach to Vulkan' solution.
mkdir build
cd build

cmake.exe .. -DUSE_PLATFORM=VK_USE_PLATFORM_WIN32_KHR -G "Visual Studio 15 2017 Win64"
cmake.exe .. -DUSE_PLATFORM=VK_USE_PLATFORM_WIN32_KHR -G "Visual Studio 16 2019" -DARCHITECTURE=x64

start "" "PracticalApproachToVulkan.sln"

Expand Down