///////////////////////////////////////////////////////
| 514 | { |
| 515 | //////////////////////////////////////////////////////////// |
| 516 | DRMContext::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 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected