mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Both chooseEGLConfig()
and chooseGLXConfig()
can also be reverted.
Since the findTransparent (GLFWbool) is sourced from the already provided `fbconfig` anyways.
This commit is contained in:
parent
aa78533764
commit
9a2890d611
@ -87,13 +87,13 @@ static int getEGLConfigAttrib(EGLConfig config, int attrib)
|
||||
//
|
||||
static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* desired,
|
||||
EGLConfig* result,
|
||||
GLFWbool findTransparent)
|
||||
EGLConfig* result)
|
||||
{
|
||||
EGLConfig* nativeConfigs;
|
||||
_GLFWfbconfig* usableConfigs;
|
||||
const _GLFWfbconfig* closest;
|
||||
int i, nativeCount, usableCount;
|
||||
GLFWbool findTransparent = desired->transparent;
|
||||
|
||||
#if defined(_GLFW_X11)
|
||||
XVisualInfo visualTemplate = {0};
|
||||
@ -492,7 +492,7 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
|
||||
if (ctxconfig->share)
|
||||
share = ctxconfig->share->context.egl.handle;
|
||||
|
||||
if (!chooseEGLConfig(ctxconfig, fbconfig, &config, fbconfig->transparent))
|
||||
if (!chooseEGLConfig(ctxconfig, fbconfig, &config))
|
||||
{
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"EGL: Failed to find a suitable EGLConfig");
|
||||
@ -737,7 +737,7 @@ GLFWbool _glfwChooseVisualEGL(const _GLFWctxconfig* ctxconfig,
|
||||
const long vimask = VisualScreenMask | VisualIDMask;
|
||||
|
||||
|
||||
if (!chooseEGLConfig(ctxconfig, fbconfig, &native, fbconfig->transparent))
|
||||
if (!chooseEGLConfig(ctxconfig, fbconfig, &native))
|
||||
{
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"EGL: Failed to find a suitable EGLConfig");
|
||||
@ -804,4 +804,3 @@ GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* handle)
|
||||
|
||||
return window->context.egl.surface;
|
||||
}
|
||||
|
||||
|
@ -47,11 +47,7 @@ static int getGLXFBConfigAttrib(GLXFBConfig fbconfig, int attrib)
|
||||
|
||||
// Return the GLXFBConfig most closely matching the specified hints
|
||||
//
|
||||
static GLFWbool chooseGLXFBConfig(
|
||||
const _GLFWfbconfig* desired,
|
||||
GLXFBConfig* result,
|
||||
GLFWbool findTransparent)
|
||||
|
||||
static GLFWbool chooseGLXFBConfig(const _GLFWfbconfig* desired, GLXFBConfig* result)
|
||||
{
|
||||
GLXFBConfig* nativeConfigs;
|
||||
_GLFWfbconfig* usableConfigs;
|
||||
@ -59,6 +55,7 @@ static GLFWbool chooseGLXFBConfig(
|
||||
int i, nativeCount, usableCount;
|
||||
const char* vendor;
|
||||
GLFWbool trustWindowBit = GLFW_TRUE;
|
||||
GLFWbool findTransparent = desired->transparent;
|
||||
|
||||
if ( !(_glfw.xrender.major || _glfw.xrender.minor) ) {
|
||||
findTransparent = GLFW_FALSE;
|
||||
@ -481,8 +478,7 @@ GLFWbool _glfwCreateContextGLX(_GLFWwindow* window,
|
||||
if (ctxconfig->share)
|
||||
share = ctxconfig->share->context.glx.handle;
|
||||
|
||||
if (!chooseGLXFBConfig(fbconfig, &native, fbconfig->transparent))
|
||||
|
||||
if (!chooseGLXFBConfig(fbconfig, &native))
|
||||
{
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"GLX: Failed to find a suitable GLXFBConfig");
|
||||
@ -669,7 +665,7 @@ GLFWbool _glfwChooseVisualGLX(const _GLFWctxconfig* ctxconfig,
|
||||
GLXFBConfig native;
|
||||
XVisualInfo* result;
|
||||
|
||||
if (!chooseGLXFBConfig(fbconfig, &native, fbconfig->transparent))
|
||||
if (!chooseGLXFBConfig(fbconfig, &native))
|
||||
{
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"GLX: Failed to find a suitable GLXFBConfig");
|
||||
|
Loading…
Reference in New Issue
Block a user