aboutsummaryrefslogtreecommitdiff
path: root/pugl
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-09-02 11:22:23 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-09-02 11:22:23 +0200
commit77095d63e4b4bc5e6b4c1f5c36550b1c2eff7001 (patch)
tree43a3fee7472e0389da43b109af539237ec74478f /pugl
parent377f00cbd21bb4bab5f9f2421eb9a64d522396bb (diff)
downloadsynthpod-77095d63e4b4bc5e6b4c1f5c36550b1c2eff7001.zip
synthpod-77095d63e4b4bc5e6b4c1f5c36550b1c2eff7001.tar.gz
synthpod-77095d63e4b4bc5e6b4c1f5c36550b1c2eff7001.tar.bz2
synthpod-77095d63e4b4bc5e6b4c1f5c36550b1c2eff7001.tar.xz
Squashed 'pugl/' changes from 4fed5fe..035884a
035884a Don't clear cairo canvas, support gl stencils git-subtree-dir: pugl git-subtree-split: 035884a7d1736f56e543e1e361f9fbe975a8706b
Diffstat (limited to 'pugl')
-rw-r--r--pugl/pugl_osx.m6
-rw-r--r--pugl/pugl_x11.c16
2 files changed, 7 insertions, 15 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 5f57798..014d553 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -544,12 +544,6 @@ void
puglEnterContext(PuglView* view)
{
[[view->impl->glview openGLContext] makeCurrentContext];
-#ifdef PUGL_HAVE_CAIRO
- if (view->ctx_type & PUGL_CAIRO) {
- cairo_set_source_rgb(view->impl->cr, 0, 0, 0);
- cairo_paint(view->impl->cr);
- }
-#endif
}
void
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c
index a8daac4..28fe99f 100644
--- a/pugl/pugl_x11.c
+++ b/pugl/pugl_x11.c
@@ -60,7 +60,8 @@ static int attrListDbl[] = {
GLX_RED_SIZE , 4,
GLX_GREEN_SIZE , 4,
GLX_BLUE_SIZE , 4,
- GLX_DEPTH_SIZE , 16,
+ GLX_DEPTH_SIZE , 8,
+ GLX_STENCIL_SIZE , 8,
/* GLX_SAMPLE_BUFFERS , 1, */
/* GLX_SAMPLES , 4, */
None
@@ -73,7 +74,8 @@ static int attrListSgl[] = {
GLX_RED_SIZE , 4,
GLX_GREEN_SIZE , 4,
GLX_BLUE_SIZE , 4,
- GLX_DEPTH_SIZE , 16,
+ GLX_DEPTH_SIZE , 8,
+ GLX_STENCIL_SIZE , 8,
/* GLX_SAMPLE_BUFFERS , 1, */
/* GLX_SAMPLES , 4, */
None
@@ -222,12 +224,6 @@ puglEnterContext(PuglView* view)
glXMakeCurrent(view->impl->display, view->impl->win, view->impl->ctx);
}
#endif
-#ifdef PUGL_HAVE_CAIRO
- if (view->ctx_type & PUGL_CAIRO) {
- cairo_set_source_rgb(view->impl->cr, 0, 0, 0);
- cairo_paint(view->impl->cr);
- }
-#endif
}
void
@@ -742,7 +738,9 @@ puglProcessEvents(PuglView* view)
}
}
- if (config_event.type) {
+ if (config_event.type
+ && ( (view->width != config_event.configure.width)
+ || (view->height != config_event.configure.height) )) {
#ifdef PUGL_HAVE_CAIRO
if (view->ctx_type == PUGL_CAIRO) {
// Resize surfaces/contexts before dispatching