Introduce usage of clang-format to format vulkan.hpp and the other sources.
This commit is contained in:
@@ -16,38 +16,39 @@
|
||||
// Create and destroy a vk::UniqueInstance
|
||||
|
||||
#include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
static char const* AppName = "01_InitInstance";
|
||||
static char const* EngineName = "Vulkan.hpp";
|
||||
static char const * AppName = "01_InitInstance";
|
||||
static char const * EngineName = "Vulkan.hpp";
|
||||
|
||||
int main(int /*argc*/, char ** /*argv*/)
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
/* VULKAN_HPP_KEY_START */
|
||||
|
||||
try
|
||||
{
|
||||
// initialize the vk::ApplicationInfo structure
|
||||
vk::ApplicationInfo applicationInfo(AppName, 1, EngineName, 1, VK_API_VERSION_1_1);
|
||||
vk::ApplicationInfo applicationInfo( AppName, 1, EngineName, 1, VK_API_VERSION_1_1 );
|
||||
|
||||
// initialize the vk::InstanceCreateInfo
|
||||
vk::InstanceCreateInfo instanceCreateInfo({}, &applicationInfo);
|
||||
vk::InstanceCreateInfo instanceCreateInfo( {}, &applicationInfo );
|
||||
|
||||
// create a UniqueInstance
|
||||
vk::UniqueInstance instance = vk::createInstanceUnique(instanceCreateInfo);
|
||||
vk::UniqueInstance instance = vk::createInstanceUnique( instanceCreateInfo );
|
||||
|
||||
// Note: No need to explicitly destroy the instance, as the corresponding destroy function is
|
||||
// called by the destructor of the UniqueInstance on leaving this scope.
|
||||
}
|
||||
catch (vk::SystemError& err)
|
||||
catch ( vk::SystemError & err )
|
||||
{
|
||||
std::cout << "vk::SystemError: " << err.what() << std::endl;
|
||||
exit(-1);
|
||||
exit( -1 );
|
||||
}
|
||||
catch (...)
|
||||
catch ( ... )
|
||||
{
|
||||
std::cout << "unknown error\n";
|
||||
exit(-1);
|
||||
exit( -1 );
|
||||
}
|
||||
|
||||
/* VULKAN_HPP_KEY_END */
|
||||
|
||||
Reference in New Issue
Block a user