diff options
author | Michal Krol <[email protected]> | 2010-11-05 18:54:02 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-11-08 17:24:11 +0100 |
commit | 136ff67ce8a626e628dd76aeb7feba8cf9436cd7 (patch) | |
tree | 52c319f96639d8ce4a867d16b34010f8c97ad144 /src/gallium/include/state_tracker | |
parent | 9e7132b52debd3d592391ce89d3582027cb0e161 (diff) |
graw: Export graw_save_surface_to_file().
Allows applications to dump surfaces to file without
referencing gallium/auxiliary entry points statically.
Existing test apps have been modified such that
they save the contents of the fronbuffer only
when the `-o' option's specified.
Diffstat (limited to 'src/gallium/include/state_tracker')
-rw-r--r-- | src/gallium/include/state_tracker/graw.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/include/state_tracker/graw.h b/src/gallium/include/state_tracker/graw.h index 6a99b234aa5..8da197f68bf 100644 --- a/src/gallium/include/state_tracker/graw.h +++ b/src/gallium/include/state_tracker/graw.h @@ -71,4 +71,25 @@ PUBLIC void *graw_parse_vertex_shader( struct pipe_context *pipe, PUBLIC void *graw_parse_fragment_shader( struct pipe_context *pipe, const char *text ); +/* Parse a single command-line option, if any. Options include: + * + * -o <filename> + * + * If an option has been successfully parsed, argi is updated + * to point just after the option and return TRUE. + */ +PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]); + +/* Saves surface contents to a file. + * + * If filename is NULL, the filename provided with the `-o' option + * is used. If the option has not been specified, the surface + * will not be saved. + * + * Returns TRUE if the surface has been saved. + */ +PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe, + struct pipe_surface *surface, + const char *filename); + #endif |