Blender  V2.59
ED_render.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) 2005 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * ***** END GPL LICENSE BLOCK *****
00022  */
00023 
00028 #ifndef ED_RENDER_H
00029 #define ED_RENDER_H
00030 
00031 #include "DNA_vec_types.h"
00032 
00033 struct bContext;
00034 struct ID;
00035 struct Main;
00036 struct MTex;
00037 struct Render;
00038 struct RenderInfo;
00039 
00040 /* render_ops.c */
00041 
00042 void ED_operatortypes_render(void);
00043 
00044 /* render_shading.c */
00045 
00046 void ED_render_id_flush_update(struct Main *bmain, struct ID *id);
00047 
00048 /* render_preview.c */
00049 
00050 /* stores rendered preview  - is also used for icons */
00051 typedef struct RenderInfo {
00052         int pr_rectx;
00053         int pr_recty;
00054         short curtile, tottile, status;
00055         rcti disprect;                  /* storage for view3d preview rect */
00056         unsigned int* rect;             
00057         struct Render *re;              /* persistant render */
00058 } RenderInfo;
00059 
00060 /* ri->status */
00061 #define PR_DBASE                        1
00062 #define PR_DISPRECT                     2
00063 #define PR_PROJECTED            4
00064 #define PR_ROTATED                      8
00065 
00066 /* Render the preview
00067 
00068 pr_method:
00069 - PR_BUTS_RENDER: preview is rendered for buttons window
00070 - PR_ICON_RENDER: preview is rendered for icons. hopefully fast enough for at least 32x32 
00071 - PR_NODE_RENDER: preview is rendered for node editor.
00072 */
00073 
00074 #define PR_BUTS_RENDER  0
00075 #define PR_ICON_RENDER  1
00076 #define PR_NODE_RENDER  2
00077 
00078 void ED_preview_init_dbase(void);
00079 void ED_preview_free_dbase(void);
00080 
00081 void ED_preview_shader_job(const struct bContext *C, void *owner, struct ID *id, struct ID *parent, struct MTex *slot, int sizex, int sizey, int method);
00082 void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey);
00083 void ED_preview_kill_jobs(const struct bContext *C);
00084 
00085 void ED_preview_draw(const struct bContext *C, void *idp, void *parentp, void *slot, rcti *rect);
00086 
00087 void ED_render_clear_mtex_copybuf(void);
00088 
00089 #endif