diff options
author | Keith Packard <keithp@keithp.com> | 2014-09-10 19:05:08 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-09-12 22:03:22 -0700 |
commit | 44da6677ef03ed66924a43c4b30cb5a3f351f87b (patch) | |
tree | 0ff04fb641160d0110d57b1b6ecdc76c1a15e321 | |
parent | d095a10275f26556c5789a35447d43817131b2dd (diff) |
ephyr: Create 3.3 core profile context if possibleglamor-core-profile
On desktop GL, Ask for a 3.3 core profile context if that's available,
otherwise create a generic context.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/kdrive/ephyr/ephyr_glamor_glx.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/hw/kdrive/ephyr/ephyr_glamor_glx.c b/hw/kdrive/ephyr/ephyr_glamor_glx.c index d284a788c..6093afe98 100644 --- a/hw/kdrive/ephyr/ephyr_glamor_glx.c +++ b/hw/kdrive/ephyr/ephyr_glamor_glx.c @@ -317,7 +317,19 @@ ephyr_glamor_glx_screen_init(xcb_window_t win) "GLX_EXT_create_context_es2_profile\n"); } } else { - ctx = glXCreateContext(dpy, visual_info, NULL, True); + static const int context_attribs[] = { + GLX_CONTEXT_PROFILE_MASK_ARB, + GLX_CONTEXT_CORE_PROFILE_BIT_ARB, + GLX_CONTEXT_MAJOR_VERSION_ARB, + 3, + GLX_CONTEXT_MINOR_VERSION_ARB, + 3, + 0, + }; + ctx = glXCreateContextAttribsARB(dpy, fb_config, NULL, True, + context_attribs); + if (!ctx) + ctx = glXCreateContext(dpy, visual_info, NULL, True); } if (ctx == NULL) FatalError("glXCreateContext failed\n"); |