///////////////////////////////////////////////////////
| 760 | |
| 761 | //////////////////////////////////////////////////////////// |
| 762 | EGLConfig DRMContext::getBestConfig(EGLDisplay display, const ContextSettings& settings) |
| 763 | { |
| 764 | // Set our video settings constraint |
| 765 | const std::array attributes = |
| 766 | { EGL_DEPTH_SIZE, |
| 767 | static_cast<EGLint>(settings.depthBits), |
| 768 | EGL_STENCIL_SIZE, |
| 769 | static_cast<EGLint>(settings.stencilBits), |
| 770 | EGL_SAMPLE_BUFFERS, |
| 771 | static_cast<EGLint>(settings.antiAliasingLevel), |
| 772 | EGL_BLUE_SIZE, |
| 773 | 8, |
| 774 | EGL_GREEN_SIZE, |
| 775 | 8, |
| 776 | EGL_RED_SIZE, |
| 777 | 8, |
| 778 | EGL_ALPHA_SIZE, |
| 779 | 8, |
| 780 | EGL_SURFACE_TYPE, |
| 781 | EGL_WINDOW_BIT, |
| 782 | #if defined(SFML_OPENGL_ES) |
| 783 | EGL_RENDERABLE_TYPE, |
| 784 | EGL_OPENGL_ES_BIT, |
| 785 | #else |
| 786 | EGL_RENDERABLE_TYPE, |
| 787 | EGL_OPENGL_BIT, |
| 788 | #endif |
| 789 | EGL_NONE }; |
| 790 | |
| 791 | EGLint configCount = 0; |
| 792 | std::array<EGLConfig, 1> configs{}; |
| 793 | |
| 794 | // Ask EGL for the best config matching our video settings |
| 795 | eglCheck(eglChooseConfig(display, attributes.data(), configs.data(), configs.size(), &configCount)); |
| 796 | |
| 797 | return configs[0]; |
| 798 | } |
| 799 | |
| 800 | |
| 801 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no outgoing calls
no test coverage detected