///////////////////////////////////////////////////////
| 74 | |
| 75 | //////////////////////////////////////////////////////////// |
| 76 | void 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 |
no test coverage detected