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

Method createContext

src/SFML/Window/DRM/DRMContext.cpp:701–713  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

699
700////////////////////////////////////////////////////////////
701void 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////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected