diff options
author | David Robillard <d@drobilla.net> | 2023-01-08 12:54:56 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-08 22:31:51 -0500 |
commit | f1524acbd3e708d1764b7f1533d707b22254ae95 (patch) | |
tree | 83a0a08ca2a7360abaca32e2717090e07b21f0aa /src/win_gl.c | |
parent | 1e8431373a494c27c74e34bfa7ab0247e3c29677 (diff) | |
download | pugl-f1524acbd3e708d1764b7f1533d707b22254ae95.tar.gz pugl-f1524acbd3e708d1764b7f1533d707b22254ae95.tar.bz2 pugl-f1524acbd3e708d1764b7f1533d707b22254ae95.zip |
Add PUGL_SAMPLE_BUFFERS hint
Towards a more direct and explicit mapping to platform hints, and more
consistent behaviour across platforms. OpenGL applications are generally
expected to be explicit about hints like this.
Diffstat (limited to 'src/win_gl.c')
-rw-r--r-- | src/win_gl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/win_gl.c b/src/win_gl.c index 44795f5..9850b6f 100644 --- a/src/win_gl.c +++ b/src/win_gl.c @@ -103,7 +103,10 @@ puglWinGlConfigure(PuglView* view) view->hints[PUGL_STENCIL_BITS] = 0; } if (view->hints[PUGL_SAMPLES] == PUGL_DONT_CARE) { - view->hints[PUGL_SAMPLES] = 1; + view->hints[PUGL_SAMPLES] = 0; + } + if (view->hints[PUGL_SAMPLE_BUFFERS] == PUGL_DONT_CARE) { + view->hints[PUGL_SAMPLE_BUFFERS] = view->hints[PUGL_SAMPLES] > 0; } if (view->hints[PUGL_DOUBLE_BUFFER] == PUGL_DONT_CARE) { view->hints[PUGL_DOUBLE_BUFFER] = 1; @@ -119,7 +122,7 @@ puglWinGlConfigure(PuglView* view) WGL_SUPPORT_OPENGL_ARB, GL_TRUE, WGL_DOUBLE_BUFFER_ARB, view->hints[PUGL_DOUBLE_BUFFER], WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, - WGL_SAMPLE_BUFFERS_ARB, view->hints[PUGL_SAMPLES] ? 1 : 0, + WGL_SAMPLE_BUFFERS_ARB, view->hints[PUGL_SAMPLE_BUFFERS], WGL_SAMPLES_ARB, view->hints[PUGL_SAMPLES], WGL_RED_BITS_ARB, view->hints[PUGL_RED_BITS], WGL_GREEN_BITS_ARB, view->hints[PUGL_GREEN_BITS], |