mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
6a62e3077b
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) |
||
---|---|---|
.. | ||
cogl-texture-pixmap-x11-private.h | ||
cogl-texture-pixmap-x11.c | ||
cogl-texture-pixmap-x11.h | ||
cogl-winsys-egl-android-private.h | ||
cogl-winsys-egl-android.c | ||
cogl-winsys-egl-feature-functions.h | ||
cogl-winsys-egl-gdl-private.h | ||
cogl-winsys-egl-gdl.c | ||
cogl-winsys-egl-kms-private.h | ||
cogl-winsys-egl-kms.c | ||
cogl-winsys-egl-null-private.h | ||
cogl-winsys-egl-null.c | ||
cogl-winsys-egl-private.h | ||
cogl-winsys-egl-wayland-private.h | ||
cogl-winsys-egl-wayland.c | ||
cogl-winsys-egl-x11-private.h | ||
cogl-winsys-egl-x11.c | ||
cogl-winsys-egl.c | ||
cogl-winsys-glx-feature-functions.h | ||
cogl-winsys-glx-private.h | ||
cogl-winsys-glx.c | ||
cogl-winsys-private.h | ||
cogl-winsys-sdl2.c | ||
cogl-winsys-sdl-private.h | ||
cogl-winsys-sdl.c | ||
cogl-winsys-stub-private.h | ||
cogl-winsys-stub.c | ||
cogl-winsys-wgl-feature-functions.h | ||
cogl-winsys-wgl-private.h | ||
cogl-winsys-wgl.c | ||
cogl-winsys.c |