Blender V2.61 - r43446

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 struct Scene;
00040 
00041 /* render_ops.c */
00042 
00043 void ED_operatortypes_render(void);
00044 
00045 /* render_shading.c */
00046 
00047 void ED_render_id_flush_update(struct Main *bmain, struct ID *id);
00048 void ED_render_engine_changed(struct Main *bmain);
00049 void ED_render_scene_update(struct Main *bmain, struct Scene *scene, int updated);
00050 
00051 /* render_preview.c */
00052 
00053 /* stores rendered preview  - is also used for icons */
00054 typedef struct RenderInfo {
00055     int pr_rectx;
00056     int pr_recty;
00057     short curtile, tottile, status;
00058     rcti disprect;          /* storage for view3d preview rect */
00059     unsigned int* rect;     
00060     struct Render *re;      /* persistent render */
00061 } RenderInfo;
00062 
00063 /* ri->status */
00064 #define PR_DBASE            1
00065 #define PR_DISPRECT         2
00066 #define PR_PROJECTED        4
00067 #define PR_ROTATED          8
00068 
00069 /* Render the preview
00070 
00071 pr_method:
00072 - PR_BUTS_RENDER: preview is rendered for buttons window
00073 - PR_ICON_RENDER: preview is rendered for icons. hopefully fast enough for at least 32x32 
00074 - PR_NODE_RENDER: preview is rendered for node editor.
00075 */
00076 
00077 #define PR_BUTS_RENDER  0
00078 #define PR_ICON_RENDER  1
00079 #define PR_NODE_RENDER  2
00080 
00081 void ED_preview_init_dbase(void);
00082 void ED_preview_free_dbase(void);
00083 
00084 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);
00085 void ED_preview_icon_job(const struct bContext *C, void *owner, struct ID *id, unsigned int *rect, int sizex, int sizey);
00086 void ED_preview_kill_jobs(const struct bContext *C);
00087 
00088 void ED_preview_draw(const struct bContext *C, void *idp, void *parentp, void *slot, rcti *rect);
00089 
00090 void ED_render_clear_mtex_copybuf(void);
00091 
00092 #endif