[gnome-shell] screenGrabber: Pass correct coordinates to glReadPixels



commit 87559414a39370ffcddb735ed54e9fa4fab1963f
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Sat Feb 4 16:56:16 2012 +0100

    screenGrabber: Pass correct coordinates to glReadPixels
    
    Pass x and y to glReadPixels rather then always 0, 0.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669366

 src/shell-screen-grabber.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-screen-grabber.c b/src/shell-screen-grabber.c
index 283e234..f8ddaa1 100644
--- a/src/shell-screen-grabber.c
+++ b/src/shell-screen-grabber.c
@@ -165,7 +165,7 @@ shell_screen_grabber_grab (ShellScreenGrabber *grabber,
           pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
         }
 
-      glReadPixels (0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0);
+      glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0);
 
       mapped_data = pf_glMapBufferARB (GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]