| 995 | } |
| 996 | |
| 997 | WindowData createWindow( std::string const & windowName, vk::Extent2D const & extent ) |
| 998 | { |
| 999 | struct glfwContext |
| 1000 | { |
| 1001 | glfwContext() |
| 1002 | { |
| 1003 | glfwInit(); |
| 1004 | glfwSetErrorCallback( []( int error, const char * msg ) { std::cerr << "glfw: " << "(" << error << ") " << msg << std::endl; } ); |
| 1005 | } |
| 1006 | |
| 1007 | ~glfwContext() |
| 1008 | { |
| 1009 | glfwTerminate(); |
| 1010 | } |
| 1011 | }; |
| 1012 | |
| 1013 | static auto glfwCtx = glfwContext(); |
| 1014 | (void)glfwCtx; |
| 1015 | |
| 1016 | glfwWindowHint( GLFW_CLIENT_API, GLFW_NO_API ); |
| 1017 | GLFWwindow * window = glfwCreateWindow( extent.width, extent.height, windowName.c_str(), nullptr, nullptr ); |
| 1018 | return WindowData( window, windowName, extent ); |
| 1019 | } |
| 1020 | |
| 1021 | vk::DebugUtilsMessengerCreateInfoEXT makeDebugUtilsMessengerCreateInfoEXT() |
| 1022 | { |
no test coverage detected