mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-07 16:58:24 +02:00
[gl] Use GL_MESA_pack_invert to flip get_image of windows around.
This doesn't have any fallback for a GL that fails to implement the extension. Fixes 120 testcases for gl-window.
This commit is contained in:
parent
11a120fb84
commit
8558cd5790
1 changed files with 4 additions and 0 deletions
|
|
@ -759,9 +759,13 @@ _cairo_gl_surface_get_image (cairo_gl_surface_t *surface,
|
|||
|
||||
glPixelStorei (GL_PACK_ALIGNMENT, 1);
|
||||
glPixelStorei (GL_PACK_ROW_LENGTH, image->stride / cpp);
|
||||
if (surface->fb == 0 && GLEW_MESA_pack_invert)
|
||||
glPixelStorei (GL_PACK_INVERT_MESA, 1);
|
||||
glReadPixels (interest->x, interest->y,
|
||||
interest->width, interest->height,
|
||||
format, type, image->data);
|
||||
if (surface->fb == 0 && GLEW_MESA_pack_invert)
|
||||
glPixelStorei (GL_PACK_INVERT_MESA, 0);
|
||||
|
||||
while ((err = glGetError ()))
|
||||
fprintf (stderr, "GL error 0x%08x\n", (int) err);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue