mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
EGL: Cleanup
Both config parameters are "desired", but one is older and never had its name updated. This commit at least makes it clearer that they are similar.
This commit is contained in:
parent
93e93135f2
commit
ab1b1edfd0
@ -88,7 +88,7 @@ static int getEGLConfigAttrib(EGLConfig config, int attrib)
|
|||||||
// Return the EGLConfig most closely matching the specified hints
|
// Return the EGLConfig most closely matching the specified hints
|
||||||
//
|
//
|
||||||
static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
||||||
const _GLFWfbconfig* desired,
|
const _GLFWfbconfig* fbconfig,
|
||||||
EGLConfig* result)
|
EGLConfig* result)
|
||||||
{
|
{
|
||||||
EGLConfig* nativeConfigs;
|
EGLConfig* nativeConfigs;
|
||||||
@ -107,7 +107,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
|||||||
else
|
else
|
||||||
apiBit = EGL_OPENGL_BIT;
|
apiBit = EGL_OPENGL_BIT;
|
||||||
|
|
||||||
if (desired->stereo)
|
if (fbconfig->stereo)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE, "EGL: Stereo rendering not supported");
|
_glfwInputError(GLFW_FORMAT_UNAVAILABLE, "EGL: Stereo rendering not supported");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
@ -149,7 +149,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
|||||||
if (!vi.visualid)
|
if (!vi.visualid)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (desired->transparent)
|
if (fbconfig->transparent)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
XVisualInfo* vis =
|
XVisualInfo* vis =
|
||||||
@ -186,20 +186,20 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
|
|||||||
// with an alpha channel to ensure the buffer is opaque
|
// with an alpha channel to ensure the buffer is opaque
|
||||||
if (!_glfw.egl.EXT_present_opaque)
|
if (!_glfw.egl.EXT_present_opaque)
|
||||||
{
|
{
|
||||||
if (!desired->transparent && u->alphaBits > 0)
|
if (!fbconfig->transparent && u->alphaBits > 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // _GLFW_WAYLAND
|
#endif // _GLFW_WAYLAND
|
||||||
|
|
||||||
u->samples = getEGLConfigAttrib(n, EGL_SAMPLES);
|
u->samples = getEGLConfigAttrib(n, EGL_SAMPLES);
|
||||||
u->doublebuffer = desired->doublebuffer;
|
u->doublebuffer = fbconfig->doublebuffer;
|
||||||
|
|
||||||
u->handle = (uintptr_t) n;
|
u->handle = (uintptr_t) n;
|
||||||
usableCount++;
|
usableCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
closest = _glfwChooseFBConfig(fbconfig, usableConfigs, usableCount);
|
||||||
if (closest)
|
if (closest)
|
||||||
*result = (EGLConfig) closest->handle;
|
*result = (EGLConfig) closest->handle;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user