From eb5926719629d19dfddd1028e8bc73bc03d9b568 Mon Sep 17 00:00:00 2001 From: Vlad Firoiu Date: Thu, 28 Dec 2017 22:42:43 -0500 Subject: [PATCH 1/2] Surfaceless egl rendering. --- Source/Core/Common/GL/GLInterface/EGL.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Common/GL/GLInterface/EGL.cpp b/Source/Core/Common/GL/GLInterface/EGL.cpp index 9d1983190c..d4fa3b352e 100644 --- a/Source/Core/Common/GL/GLInterface/EGL.cpp +++ b/Source/Core/Common/GL/GLInterface/EGL.cpp @@ -63,6 +63,7 @@ void cInterfaceEGL::DetectMode() // 8 bits per color int attribs[] = {EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_RENDERABLE_TYPE, renderable_type, + EGL_SURFACE_TYPE, 0, EGL_NONE}; // Get how many configs there are @@ -180,6 +181,7 @@ bool cInterfaceEGL::Create(void* window_handle, bool stereo, bool core) 8, EGL_BLUE_SIZE, 8, + EGL_SURFACE_TYPE, 0, EGL_NONE}; std::vector ctx_attribs; From 45ac9b678defcf597fa2cc98d0c5814cb90039c8 Mon Sep 17 00:00:00 2001 From: Vlad Firoiu Date: Fri, 29 Dec 2017 23:20:16 -0500 Subject: [PATCH 2/2] Require WINDOW_BIT if we have a window handle. --- Source/Core/Common/GL/GLInterface/EGL.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/GL/GLInterface/EGL.cpp b/Source/Core/Common/GL/GLInterface/EGL.cpp index d4fa3b352e..cb767bd2a4 100644 --- a/Source/Core/Common/GL/GLInterface/EGL.cpp +++ b/Source/Core/Common/GL/GLInterface/EGL.cpp @@ -61,9 +61,16 @@ void cInterfaceEGL::DetectMode() { // attributes for a visual in RGBA format with at least // 8 bits per color - int attribs[] = {EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, EGL_RENDERABLE_TYPE, renderable_type, - EGL_SURFACE_TYPE, 0, + int attribs[] = {EGL_RED_SIZE, + 8, + EGL_GREEN_SIZE, + 8, + EGL_BLUE_SIZE, + 8, + EGL_RENDERABLE_TYPE, + renderable_type, + EGL_SURFACE_TYPE, + m_has_handle ? EGL_WINDOW_BIT : 0, EGL_NONE}; // Get how many configs there are @@ -181,7 +188,8 @@ bool cInterfaceEGL::Create(void* window_handle, bool stereo, bool core) 8, EGL_BLUE_SIZE, 8, - EGL_SURFACE_TYPE, 0, + EGL_SURFACE_TYPE, + m_has_handle ? EGL_WINDOW_BIT : 0, EGL_NONE}; std::vector ctx_attribs;