mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-02 03:00:40 +01:00
clients/simple-egl: Display RGBA information for selected EGL config
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
This commit is contained in:
parent
f6294962fd
commit
479a0247c9
1 changed files with 11 additions and 0 deletions
|
|
@ -195,6 +195,7 @@ init_egl(struct display *display, struct window *window)
|
|||
EGLint major, minor, n, count, i;
|
||||
EGLConfig *configs;
|
||||
EGLBoolean ret;
|
||||
int r, g, b, a;
|
||||
|
||||
if (window->opaque || window->buffer_bpp == 16)
|
||||
config_attribs[9] = 0;
|
||||
|
|
@ -238,6 +239,16 @@ init_egl(struct display *display, struct window *window)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
eglGetConfigAttrib(display->egl.dpy,
|
||||
display->egl.conf, EGL_RED_SIZE, &r);
|
||||
eglGetConfigAttrib(display->egl.dpy,
|
||||
display->egl.conf, EGL_GREEN_SIZE, &g);
|
||||
eglGetConfigAttrib(display->egl.dpy,
|
||||
display->egl.conf, EGL_BLUE_SIZE, &b);
|
||||
eglGetConfigAttrib(display->egl.dpy,
|
||||
display->egl.conf, EGL_ALPHA_SIZE, &a);
|
||||
printf("Using config: r%dg%db%da%d\n", r, g, b, a);
|
||||
|
||||
display->egl.ctx = eglCreateContext(display->egl.dpy,
|
||||
display->egl.conf,
|
||||
EGL_NO_CONTEXT, context_attribs);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue