Make struct cast operators explicit.
This commit is contained in:
@@ -96,7 +96,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
( formats[0].format == vk::Format::eUndefined ) ? vk::Format::eB8G8R8A8Unorm : formats[0].format;
|
||||
|
||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( *surface );
|
||||
VkExtent2D swapchainExtent;
|
||||
vk::Extent2D swapchainExtent;
|
||||
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
||||
{
|
||||
// If the surface size is undefined, the size is set to the size of the images requested.
|
||||
@@ -160,7 +160,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
|
||||
std::vector<vk::raii::ImageView> imageViews;
|
||||
imageViews.reserve( swapChainImages.size() );
|
||||
vk::ImageViewCreateInfo imageViewCreateInfo(
|
||||
vk::ImageViewCreateInfo imageViewCreateInfo(
|
||||
{}, {}, vk::ImageViewType::e2D, format, {}, { vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1 } );
|
||||
for ( auto image : swapChainImages )
|
||||
{
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace vk
|
||||
colorFormat = surfaceFormat.format;
|
||||
|
||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevice.getSurfaceCapabilitiesKHR( *surface );
|
||||
VkExtent2D swapchainExtent;
|
||||
vk::Extent2D swapchainExtent;
|
||||
if ( surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max() )
|
||||
{
|
||||
// If the surface size is undefined, the size is set to the size of the images requested.
|
||||
|
||||
Reference in New Issue
Block a user