Commit 8c7384f6 authored by Hanspeter Portner's avatar Hanspeter Portner

Squashed 'pugl/' changes from 4fed5fe2..035884a7

035884a7 Don't clear cairo canvas, support gl stencils

git-subtree-dir: pugl
git-subtree-split: 035884a7d1736f56e543e1e361f9fbe975a8706b
parent c403fd80
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment