diff options
author | David Robillard <d@drobilla.net> | 2019-08-03 16:14:54 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-03 08:32:16 +0200 |
commit | e3b2f305b98747c84fd87eb97e3fa8516acecbfb (patch) | |
tree | 784892b7d0a488422a8f53e0be974d2864506148 /pugl/detail/x11_gl.c | |
parent | 0706f4a121f6f9c5b96a19c4272a8636fc230cbc (diff) | |
download | pugl-e3b2f305b98747c84fd87eb97e3fa8516acecbfb.tar.gz pugl-e3b2f305b98747c84fd87eb97e3fa8516acecbfb.tar.bz2 pugl-e3b2f305b98747c84fd87eb97e3fa8516acecbfb.zip |
Simplify hints implementation
Diffstat (limited to 'pugl/detail/x11_gl.c')
-rw-r--r-- | pugl/detail/x11_gl.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c index 85c18b4..b6f3c51 100644 --- a/pugl/detail/x11_gl.c +++ b/pugl/detail/x11_gl.c @@ -71,14 +71,14 @@ puglX11GlConfigure(PuglView* view) GLX_X_VISUAL_TYPE, GLX_TRUE_COLOR, GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_SAMPLES, view->hints.samples, - GLX_RED_SIZE, puglX11GlHintValue(view->hints.red_bits), - GLX_GREEN_SIZE, puglX11GlHintValue(view->hints.green_bits), - GLX_BLUE_SIZE, puglX11GlHintValue(view->hints.blue_bits), - GLX_ALPHA_SIZE, puglX11GlHintValue(view->hints.alpha_bits), - GLX_DEPTH_SIZE, puglX11GlHintValue(view->hints.depth_bits), - GLX_STENCIL_SIZE, puglX11GlHintValue(view->hints.stencil_bits), - GLX_DOUBLEBUFFER, puglX11GlHintValue(view->hints.double_buffer), + GLX_SAMPLES, view->hints[PUGL_SAMPLES], + GLX_RED_SIZE, puglX11GlHintValue(view->hints[PUGL_RED_BITS]), + GLX_GREEN_SIZE, puglX11GlHintValue(view->hints[PUGL_GREEN_BITS]), + GLX_BLUE_SIZE, puglX11GlHintValue(view->hints[PUGL_BLUE_BITS]), + GLX_ALPHA_SIZE, puglX11GlHintValue(view->hints[PUGL_ALPHA_BITS]), + GLX_DEPTH_SIZE, puglX11GlHintValue(view->hints[PUGL_DEPTH_BITS]), + GLX_STENCIL_SIZE, puglX11GlHintValue(view->hints[PUGL_STENCIL_BITS]), + GLX_DOUBLEBUFFER, puglX11GlHintValue(view->hints[PUGL_DOUBLE_BUFFER]), None }; @@ -117,9 +117,9 @@ puglX11GlCreate(PuglView* view) const GLXFBConfig fb_config = surface->fb_config; const int ctx_attrs[] = { - GLX_CONTEXT_MAJOR_VERSION_ARB, view->hints.context_version_major, - GLX_CONTEXT_MINOR_VERSION_ARB, view->hints.context_version_minor, - GLX_CONTEXT_PROFILE_MASK_ARB, (view->hints.use_compat_profile + GLX_CONTEXT_MAJOR_VERSION_ARB, view->hints[PUGL_CONTEXT_VERSION_MAJOR], + GLX_CONTEXT_MINOR_VERSION_ARB, view->hints[PUGL_CONTEXT_VERSION_MINOR], + GLX_CONTEXT_PROFILE_MASK_ARB, (view->hints[PUGL_USE_COMPAT_PROFILE] ? GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB : GLX_CONTEXT_CORE_PROFILE_BIT_ARB), 0}; |