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
DescriptorSetLayout
objects depending on the needs of the application usingpvrvk::Device::createDescriptorSetLayout(…)
.Create
DescriptorSet
objects based on the layouts usingpvrvk::Device::createDescriptorSet(…)
.Create memory objects such as
Buffer
andImage
usingpvrvk::Device::createBuffer
andpvrutils::uploadTexture(...)
.Populate the
DescriptorSet
objects with the memory objects using the functionpvrvk::Device::updateDescriptorSets(…)
.Create
PipelineLayout
objects using the descriptor layouts usingpvrvk::Device::createPipelineLayout(…)
.Configure
PipelineCreateInfo
objects (amongst others using those shader strings) and create the pipelines.Configure the
VertexAttributes
andVertexBindings
usually using helper utilities such aspvr::utils::CreateInputAssemblyFromXXXXX(…)
. This will automatically populate theVertexInput
area of the pipeline based on our models.Create the pipelines:
myDevice->createPipeline(…)
.