MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / create_image

Method create_image

framework/core/device.h:294–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292
293template <vkb::BindingType bindingType>
294inline std::pair<typename Device<bindingType>::ImageType, typename Device<bindingType>::DeviceMemoryType> Device<bindingType>::create_image(
295 FormatType format, Extent2DType const &extent, uint32_t mip_levels, ImageUsageFlagsType usage, MemoryPropertyFlagsType properties) const
296{
297 if constexpr (bindingType == vkb::BindingType::Cpp)
298 {
299 return create_image_impl(this->get_handle(), format, extent, mip_levels, usage, properties);
300 }
301 else
302 {
303 return static_cast<std::pair<VkImage, VkDeviceMemory>>(create_image_impl(static_cast<vk::Device>(this->get_handle()),
304 static_cast<VkFormat>(format),
305 static_cast<VkExtent2D>(extent),
306 mip_levels,
307 static_cast<VkImageUsageFlags>(usage),
308 static_cast<VkMemoryPropertyFlags>(properties)));
309 }
310}
311
312template <vkb::BindingType bindingType>
313inline void Device<bindingType>::create_internal_command_pool()

Callers 1

setup_depth_stencilMethod · 0.45

Calls 1

get_handleMethod · 0.45

Tested by

no test coverage detected