X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fgrab-ximage.h;h=2fd589f5812ac2819feffeccfdf9b0f536c6288f;hp=7e82489ab54d4e2098ecdcde4b4568b0188fe63b;hb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;hpb=ccb7f4903325f92555a9722bba74b58346654ba0 diff --git a/hacks/glx/grab-ximage.h b/hacks/glx/grab-ximage.h index 7e82489a..2fd589f5 100644 --- a/hacks/glx/grab-ximage.h +++ b/hacks/glx/grab-ximage.h @@ -1,5 +1,5 @@ /* grab-ximage.c --- grab the screen to an XImage for use with OpenGL. - * xscreensaver, Copyright (c) 2001-2005 Jamie Zawinski + * xscreensaver, Copyright (c) 2001-2006 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -14,7 +14,8 @@ #define __GRAB_XIMAGE_H__ /* Grabs an image of the desktop (or another random image file) and - loads tht image into GL's texture memory. + loads the image into GL's texture memory. Most of the work is done + in the background; when the image has been loaded, a callback is run. As a side-effect, that image *may* be painted onto the given Window. @@ -54,37 +55,22 @@ [gx/tw - (gx+gw)/tw] If you want to display a quad that is the same [gy/th - (gy+gh)/th] size as the loaded image file. - Writes to stderr and returns False on error. - */ -Bool screen_to_texture (Screen *screen, Window window, - int desired_width, int desired_height, - Bool mipmap_p, - char **filename_return, - XRectangle *geometry_return, - int *image_width_return, - int *image_height_return, - int *texture_width_return, - int *texture_height_return); - - -/* Like the above, but the image is loaded in a background process, - and a callback is run when the loading is complete. When the callback is called, the image data will have been loaded into texture number `texid' (via glBindTexture.) If an error occurred, width/height will be 0. */ -void screen_to_texture_async (Screen *screen, Window window, - int desired_width, int desired_height, - Bool mipmap_p, - GLuint texid, - void (*callback) (const char *filename, - XRectangle *geometry, - int image_width, - int image_height, - int texture_width, - int texture_height, - void *closure), - void *closure); +void load_texture_async (Screen *, Window, GLXContext, + int desired_width, int desired_height, + Bool mipmap_p, + GLuint texid, + void (*callback) (const char *filename, + XRectangle *geometry, + int image_width, + int image_height, + int texture_width, + int texture_height, + void *closure), + void *closure); #endif /* __GRAB_XIMAGE_H__ */