Blender V2.61 - r43446

render_result.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2007 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00032 #ifndef RENDER_RESULT_H
00033 #define RENDER_RESULT_H
00034 
00035 #define PASS_VECTOR_MAX 10000.0f
00036 
00037 #define RR_USE_MEM      0
00038 #define RR_USE_EXR      1
00039 
00040 struct ImBuf;
00041 struct ListBase;
00042 struct Render;
00043 struct RenderData;
00044 struct RenderLayer;
00045 struct RenderResult;
00046 struct Scene;
00047 struct rcti;
00048 
00049 /* New */
00050 
00051 struct RenderResult *render_result_new(struct Render *re,
00052     struct rcti *partrct, int crop, int savebuffers);
00053 struct RenderResult *render_result_new_full_sample(struct Render *re,
00054     struct ListBase *lb, struct rcti *partrct, int crop, int savebuffers);
00055 
00056 struct RenderResult *render_result_new_from_exr(void *exrhandle, int rectx, int recty);
00057 
00058 /* Merge */
00059 
00060 void render_result_merge(struct RenderResult *rr, struct RenderResult *rrpart);
00061 
00062 /* Free */
00063 
00064 void render_result_free(struct RenderResult *rr);
00065 void render_result_free_list(struct ListBase *lb, struct RenderResult *rr);
00066 
00067 /* Single Layer Render */
00068 
00069 void render_result_single_layer_begin(struct Render *re);
00070 void render_result_single_layer_end(struct Render *re);
00071 
00072 /* EXR Tile File Render */
00073 
00074 void render_result_exr_file_begin(struct Render *re);
00075 void render_result_exr_file_end(struct Render *re);
00076 
00077 void render_result_exr_file_merge(struct RenderResult *rr, struct RenderResult *rrpart);
00078 
00079 void render_result_exr_file_path(struct Scene *scene, int sample, char *filepath);
00080 int render_result_exr_file_read(struct Render *re, int sample);
00081 int render_result_exr_file_read_path(struct RenderResult *rr, const char *filepath);
00082 
00083 /* Combined Pixel Rect */
00084 
00085 struct ImBuf *render_result_rect_to_ibuf(struct RenderResult *rr, struct RenderData *rd);
00086 void render_result_rect_from_ibuf(struct RenderResult *rr, struct RenderData *rd,
00087     struct ImBuf *ibuf);
00088 
00089 void render_result_rect_fill_zero(struct RenderResult *rr);
00090 void render_result_rect_get_pixels(struct RenderResult *rr, struct RenderData *rd,
00091     unsigned int *rect, int rectx, int recty);
00092 
00093 #endif /* RENDER_RESULT_H */
00094