MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Hpp / SurfaceData

Method SurfaceData

samples/utils/utils.cpp:783–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781 }
782
783 SurfaceData::SurfaceData( vk::Instance const & instance, std::string const & windowName, vk::Extent2D const & extent_ )
784 : extent( extent_ ), window( vk::su::createWindow( windowName, extent ) )
785 {
786 VkSurfaceKHR _surface;
787 VkResult err = glfwCreateWindowSurface( instance, window.handle, nullptr, &_surface );
788 if ( err != VK_SUCCESS )
789 throw std::runtime_error( "Failed to create window!" );
790 surface = vk::SurfaceKHR( _surface );
791 }
792
793 SwapChainData::SwapChainData( vk::PhysicalDevice const & physicalDevice,
794 vk::Device const & device,

Callers

nothing calls this directly

Calls 1

createWindowFunction · 0.85

Tested by

no test coverage detected