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

Method DRMContext

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

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

Source from the content-addressed store, hash-verified

514{
515////////////////////////////////////////////////////////////
516DRMContext::DRMContext(DRMContext* shared)
517{
518 contextCount++;
519 if (initDrm() < 0)
520 return;
521
522 setDrmMode();
523
524 // Get the initialized EGL display
525 m_display = getInitializedDisplay();
526
527 // Get the best EGL config matching the default video settings
528 m_config = getBestConfig(m_display, ContextSettings{});
529 updateSettings();
530
531 // Create EGL context
532 createContext(shared);
533
534 if (shared)
535 createSurface({drmNode.mode->hdisplay, drmNode.mode->vdisplay}, false);
536 else // create a surface to force the GL to initialize (seems to be required for glGetString() etc )
537 createSurface({1, 1}, false);
538}
539
540
541////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 4

initDrmFunction · 0.85
setDrmModeFunction · 0.85
getInitializedDisplayFunction · 0.70
getSizeMethod · 0.45

Tested by

no test coverage detected