Setting up initView for Vulkan#
Usually, the initView in the PowerVR SDK Vulkan demos is structured as follows:
Create the instance, surface, swapchain, device, and queues with PVRUtils helpers. These can be created with various levels of detail with different helpers, but usually use
pvr::utils::createInstance(…),pvr::utils::createSurface(…),pvr::utils::createDeviceAndQueues(…), andpvr::utils::createSwapchainAndDepthStencilImageView(…).Create
DescriptorSetLayoutobjects depending on the needs of the application usingpvrvk::Device::createDescriptorSetLayout(…).Create
DescriptorSetobjects based on the layouts usingpvrvk::Device::createDescriptorSet(…).Create memory objects such as
BufferandImageusingpvrvk::Device::createBufferandpvrutils::uploadTexture(...).Populate the
DescriptorSetobjects with the memory objects using the functionpvrvk::Device::updateDescriptorSets(…).Create
PipelineLayoutobjects using the descriptor layouts usingpvrvk::Device::createPipelineLayout(…).Configure
PipelineCreateInfoobjects (amongst others using those shader strings) and create the pipelines.Configure the
VertexAttributesandVertexBindingsusually using helper utilities such aspvr::utils::CreateInputAssemblyFromXXXXX(…). This will automatically populate theVertexInputarea of the pipeline based on our models.Create the pipelines:
myDevice->createPipeline(…).