mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Compare commits
2 Commits
db09dc6bb4
...
ae7239979e
Author | SHA1 | Date | |
---|---|---|---|
|
ae7239979e | ||
|
91637f4578 |
@ -868,7 +868,13 @@ GLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,
|
|||||||
XVisualInfo desired;
|
XVisualInfo desired;
|
||||||
EGLConfig native;
|
EGLConfig native;
|
||||||
EGLint visualID = 0, count = 0;
|
EGLint visualID = 0, count = 0;
|
||||||
const long vimask = VisualScreenMask | VisualIDMask;
|
long vimask;
|
||||||
|
|
||||||
|
if (fbconfig->transparent) {
|
||||||
|
vimask = VisualScreenMask;
|
||||||
|
} else {
|
||||||
|
vimask = VisualScreenMask | VisualIDMask;
|
||||||
|
}
|
||||||
|
|
||||||
if (!chooseEGLConfig(ctxconfig, fbconfig, &native))
|
if (!chooseEGLConfig(ctxconfig, fbconfig, &native))
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
@ -887,6 +893,21 @@ GLFWbool _glfwChooseVisualEGL(const _GLFWwndconfig* wndconfig,
|
|||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fbconfig->transparent) {
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
XVisualInfo *vinfo = &result[i];
|
||||||
|
if (vinfo->class == DirectColor || vinfo->class == TrueColor) {
|
||||||
|
if (vinfo->depth == 32) {
|
||||||
|
*visual = vinfo->visual;
|
||||||
|
*depth = vinfo->depth;
|
||||||
|
XFree(result);
|
||||||
|
return GLFW_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*visual = result->visual;
|
*visual = result->visual;
|
||||||
*depth = result->depth;
|
*depth = result->depth;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user