mutter/cogl/winsys
Neil Roberts 6a62e3077b sdl: Don't set SDL_GL_DOUBLEBUFFER when the swap chain has no pref
The ‘length’ for the swap chain is initially -1 which is supposed to
mean ‘no preference’. However, both of the SDL winsys's were
explicitly setting the SDL_GL_DOUBLEBUFFER attribute to zero in that
case which would try to disable double buffering.

On OS X, the equivalent to eglSwapBuffers (ie, [NSOpenGLContext
flushBuffer]) does nothing for a single buffer context. The
cogl-sdl-hello example does not specify the swap chain length so
presumably it would end up with a single buffer config. When
cogl_onscreen_swap_buffers is called it therefore does nothing and
nothing is painted.

I guess to make single-buffered contexts actually useful we should
expose some public equivalent to glFlush so that you can ensure the
rendering commands will actually hit the buffer. Alternatively we
could document that cogl_onscreen_swap_buffers performs this task on
single-buffered configs and then we could make the SDL winsys
explicitly call glFlush in that case.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 71e57f99002d5dee79bbd44b3bc57712b99acb55)
2012-11-23 15:45:26 +00:00
..
cogl-texture-pixmap-x11-private.h Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-texture-pixmap-x11.c texture: Add a context pointer to each texture 2012-09-17 23:06:20 +01:00
cogl-texture-pixmap-x11.h Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-winsys-egl-android-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-android.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-feature-functions.h kms: Use a dummy surface instead of the surfaceless extension 2012-08-15 17:29:16 +01:00
cogl-winsys-egl-gdl-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-gdl.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-kms-private.h egl: Split out the KMS winsys as overrides of the EGL winsys 2011-12-09 17:29:49 +00:00
cogl-winsys-egl-kms.c kms: Fix the version check for GBM 2012-09-06 18:30:30 +01:00
cogl-winsys-egl-null-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-null.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-private.h kms: Use a dummy surface instead of the surfaceless extension 2012-08-15 17:29:16 +01:00
cogl-winsys-egl-wayland-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-wayland.c wayland: Port to new Wayland protocol 2012-10-18 17:25:21 +01:00
cogl-winsys-egl-x11-private.h Rename the EGL_X11 winsys to EGL_XLIB 2011-12-14 16:40:26 +00:00
cogl-winsys-egl-x11.c egl-x11: Don't use GLXDrawable on EGL 2012-08-06 18:51:33 +01:00
cogl-winsys-egl.c Use the right context when pushing the GLES2 context to an onscreen 2012-10-01 15:05:22 +01:00
cogl-winsys-glx-feature-functions.h winsys-glx: Don't assume that copy_sub_buffer is synchronized 2012-03-15 15:48:13 +00:00
cogl-winsys-glx-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-glx.c winsys-glx: Remove the vblank counter feature when indirect rendering 2012-09-28 17:15:11 +01:00
cogl-winsys-private.h Avoid including the EGL headers from the public Cogl headers 2012-08-06 18:51:32 +01:00
cogl-winsys-sdl2.c sdl: Don't set SDL_GL_DOUBLEBUFFER when the swap chain has no pref 2012-11-23 15:45:26 +00:00
cogl-winsys-sdl-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-sdl.c sdl: Don't set SDL_GL_DOUBLEBUFFER when the swap chain has no pref 2012-11-23 15:45:26 +00:00
cogl-winsys-stub-private.h Make stub winsys into a proper winsys backend 2011-06-01 20:44:41 +01:00
cogl-winsys-stub.c Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +01:00
cogl-winsys-wgl-feature-functions.h Add a WGL winsys 2011-05-10 17:58:41 +01:00
cogl-winsys-wgl-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-wgl.c Add conf vars to trick Cogl to think extensions are disabled 2012-08-06 18:51:33 +01:00
cogl-winsys.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00