MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / InitializeGlfw

Function InitializeGlfw

projects/uDesigner/source/main.cpp:2715–2735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2713 }
2714
2715 int InitializeGlfw() {
2716 if(glfwInit() != GLFW_TRUE) {
2717 ShowErrorFmt("Failed to initialize GLFW!");
2718 return 1;
2719 }
2720
2721 // We don't want the old OpenGL
2722 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
2723
2724 // Open a window and create its OpenGL context
2725 g_Window = glfwCreateWindow(g_Width, g_Height, "WebGui Demo", nullptr, nullptr);
2726 if(g_Window == nullptr) {
2727 ShowErrorFmt("Failed to open GLFW window!");
2728 glfwTerminate();
2729 return -1;
2730 }
2731
2732 // Initialize GLFW
2733 glfwMakeContextCurrent(g_Window);
2734 return 0;
2735 }
2736
2737 int InitializeImGui() {
2738 IMGUI_CHECKVERSION();

Callers 1

InitializeFunction · 0.85

Calls 1

ShowErrorFmtFunction · 0.85

Tested by

no test coverage detected