MCPcopy Create free account
hub / github.com/SFML/SFML / ensureInit

Function ensureInit

src/SFML/Window/EglContext.cpp:76–99  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

74
75////////////////////////////////////////////////////////////
76void ensureInit()
77{
78 static std::once_flag flag;
79
80 std::call_once(flag,
81 []
82 {
83 if (!gladLoaderLoadEGL(EGL_NO_DISPLAY))
84 {
85 // At this point, the failure is unrecoverable
86 // Dump a message to the console and let the application terminate
87 sf::err() << "Failed to load EGL entry points" << std::endl;
88
89 assert(false);
90
91 return false;
92 }
93
94 // Continue loading with a display
95 gladLoaderLoadEGL(getInitializedDisplay());
96
97 return true;
98 });
99}
100} // namespace EglContextImpl
101} // namespace
102

Callers 4

EglContextMethod · 0.70
getFunctionMethod · 0.70
getBestConfigMethod · 0.70
selectBestVisualMethod · 0.70

Calls 2

gladLoaderLoadEGLFunction · 0.85
getInitializedDisplayFunction · 0.70

Tested by

no test coverage detected