Add samples InstanceExtensionProperties, InstanceLayerExtensionProperties, InstanceLayerProperties, MultipleSets (#320)
+ slightly adjust some other files.
This commit is contained in:
committed by
Markus Tavenrath
parent
d965a74cc0
commit
1a7779e75b
@@ -41,5 +41,4 @@ add_executable(DynamicUniform
|
||||
|
||||
set_target_properties(DynamicUniform PROPERTIES FOLDER "Samples")
|
||||
target_include_directories(DynamicUniform PUBLIC ${CMAKE_SOURCE_DIR}/glslang)
|
||||
target_link_libraries(DynamicUniform PUBLIC glslang SPIRV "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib"
|
||||
)
|
||||
target_link_libraries(DynamicUniform PUBLIC glslang SPIRV "${Vulkan_LIBRARIES}")
|
||||
|
||||
@@ -83,7 +83,7 @@ int main(int /*argc*/, char ** /*argv*/)
|
||||
glm::mat4x4 clip = glm::mat4x4(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 1.0f); // vulkan clip space has inverted y and half z !
|
||||
mvpcs[0] = clip * projection * view * model;
|
||||
|
||||
model = glm::translate(model, glm::vec3(-1.5f, -1.5f, -1.5f));
|
||||
model = glm::translate(model, glm::vec3(-1.5f, 1.5f, -1.5f));
|
||||
mvpcs[1] = clip * projection * view * model;
|
||||
|
||||
VkDeviceSize bufferSize = sizeof(glm::mat4x4);
|
||||
@@ -107,7 +107,7 @@ int main(int /*argc*/, char ** /*argv*/)
|
||||
vk::su::updateDescriptorSets(device, descriptorSets[0], vk::DescriptorType::eUniformBufferDynamic, &descriptorBufferInfo);
|
||||
|
||||
vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique(vk::PipelineCacheCreateInfo());
|
||||
vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline(device, pipelineCache, vertexShaderModule, fragmentShaderModule, sizeof(coloredCubeData[0]), pipelineLayout, renderPass);
|
||||
vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline(device, pipelineCache, vertexShaderModule, fragmentShaderModule, sizeof(coloredCubeData[0]), true, pipelineLayout, renderPass);
|
||||
|
||||
// Get the index of the next available swapchain image:
|
||||
vk::UniqueSemaphore imageAcquiredSemaphore = device->createSemaphoreUnique(vk::SemaphoreCreateInfo());
|
||||
|
||||
Reference in New Issue
Block a user