///////////////////////////////////////////////////////
| 699 | |
| 700 | //////////////////////////////////////////////////////////// |
| 701 | void DRMContext::createContext(DRMContext* shared) |
| 702 | { |
| 703 | static constexpr std::array contextVersion = {EGL_CONTEXT_CLIENT_VERSION, 1, EGL_NONE}; |
| 704 | |
| 705 | const EGLContext toShared = shared ? shared->m_context : EGL_NO_CONTEXT; |
| 706 | if (toShared != EGL_NO_CONTEXT) |
| 707 | eglCheck(eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)); |
| 708 | |
| 709 | // Create EGL context |
| 710 | m_context = eglCheck(eglCreateContext(m_display, m_config, toShared, contextVersion.data())); |
| 711 | if (m_context == EGL_NO_CONTEXT) |
| 712 | err() << "Failed to create EGL context" << std::endl; |
| 713 | } |
| 714 | |
| 715 | |
| 716 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no outgoing calls
no test coverage detected