///////////////////////////////////////////////////////
| 105 | { |
| 106 | //////////////////////////////////////////////////////////// |
| 107 | EglContext::EglContext(EglContext* shared) |
| 108 | { |
| 109 | EglContextImpl::ensureInit(); |
| 110 | |
| 111 | // Get the initialized EGL display |
| 112 | m_display = EglContextImpl::getInitializedDisplay(); |
| 113 | |
| 114 | // Get the best EGL config matching the default video settings |
| 115 | m_config = getBestConfig(m_display, VideoMode::getDesktopMode().bitsPerPixel, ContextSettings()); |
| 116 | updateSettings(); |
| 117 | |
| 118 | // Note: The EGL specs say that attribList can be a null pointer when passed to eglCreatePbufferSurface, |
| 119 | // but this is resulting in a segfault. Bug in Android? |
| 120 | static constexpr std::array attribList = {EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE}; |
| 121 | |
| 122 | m_surface = eglCheck(eglCreatePbufferSurface(m_display, m_config, attribList.data())); |
| 123 | |
| 124 | // Create EGL context |
| 125 | createContext(shared); |
| 126 | } |
| 127 | |
| 128 | |
| 129 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected