JSchpp12 / Starlight

A toy renderer utilizing Vulkan
0 stars 0 forks source link

PipelineLayout Wrapper #28

Open JSchpp12 opened 11 months ago

JSchpp12 commented 11 months ago

There is currently no wrapper for pipeline layouts. This should be easy enough to create.

Currently, an example of using and destroying a pipeline layout is as such:

        vk::PipelineLayoutCreateInfo pipelineLayoutInfo{}; 
        pipelineLayoutInfo.sType = vk::StructureType::ePipelineLayoutCreateInfo; 
        pipelineLayoutInfo.setLayoutCount = globalLayouts.size(); 
        pipelineLayoutInfo.pSetLayouts = globalLayouts.data(); 
        pipelineLayoutInfo.pPushConstantRanges = nullptr; 
        pipelineLayoutInfo.pushConstantRangeCount = 0; 
        newPipeLayout = device.getDevice().createPipelineLayout(pipelineLayoutInfo);
device.getDevice().destroyPipelineLayout(newPipeLayout);

It should be easy enough to create a wrapper which will handle deletion.