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

Function createWindow

samples/utils/utils.cpp:997–1019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 5

SurfaceDataMethod · 0.85
WindowMethod · 0.85
mainFunction · 0.85
SurfaceDataMethod · 0.85
mainFunction · 0.85

Calls 2

glfwContextClass · 0.85
WindowDataClass · 0.85

Tested by

no test coverage detected