mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
gdk: Describe egl formats more precisely
Mention the presence of a depth of stencil buffer. Related: #6542
This commit is contained in:
parent
1922174c9f
commit
8334d21c87
@ -1538,6 +1538,7 @@ describe_egl_config (EGLDisplay egl_display,
|
||||
EGLConfig egl_config)
|
||||
{
|
||||
EGLint red, green, blue, alpha, type;
|
||||
EGLint depth, stencil;
|
||||
|
||||
if (egl_config == NULL)
|
||||
return g_strdup ("-");
|
||||
@ -1556,7 +1557,15 @@ describe_egl_config (EGLDisplay egl_display,
|
||||
else
|
||||
type = EGL_COLOR_COMPONENT_TYPE_FIXED_EXT;
|
||||
|
||||
return g_strdup_printf ("R%dG%dB%dA%d%s", red, green, blue, alpha, type == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT ? "" : " float");
|
||||
if (!eglGetConfigAttrib (egl_display, egl_config, EGL_DEPTH_SIZE, &depth))
|
||||
depth = 0;
|
||||
if (!eglGetConfigAttrib (egl_display, egl_config, EGL_STENCIL_SIZE, &stencil))
|
||||
stencil = 0;
|
||||
|
||||
return g_strdup_printf ("R%dG%dB%dA%d%s%s%s", red, green, blue, alpha,
|
||||
type == EGL_COLOR_COMPONENT_TYPE_FIXED_EXT ? "" : " float",
|
||||
depth > 0 ? ", depth buffer" : "",
|
||||
stencil > 0 ? ", stencil buffer" : "");
|
||||
}
|
||||
|
||||
gpointer
|
||||
|
Loading…
Reference in New Issue
Block a user