mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +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.
(cherry picked from commit ab1b1edfd0
)
This commit is contained in:
parent
31b038663a
commit
493df4a0b5
@ -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;
|
||||||
@ -148,7 +148,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 =
|
||||||
@ -183,19 +183,19 @@ 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