~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/render/extern/include/RE_engine.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ***** BEGIN GPL LICENSE BLOCK *****
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License
 
6
 * as published by the Free Software Foundation; either version 2
 
7
 * of the License, or (at your option) any later version. 
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software Foundation,
 
16
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
17
 *
 
18
 * The Original Code is Copyright (C) 2006 Blender Foundation.
 
19
 * All rights reserved.
 
20
 *
 
21
 * The Original Code is: all of this file.
 
22
 *
 
23
 * Contributor(s): none yet.
 
24
 *
 
25
 * ***** END GPL LICENSE BLOCK *****
 
26
 */
 
27
 
 
28
/** \file RE_engine.h
 
29
 *  \ingroup render
 
30
 */
 
31
 
 
32
#ifndef __RE_ENGINE_H__
 
33
#define __RE_ENGINE_H__
 
34
 
 
35
#include "DNA_listBase.h"
 
36
#include "RNA_types.h"
 
37
 
 
38
struct Object;
 
39
struct Render;
 
40
struct RenderEngine;
 
41
struct RenderEngineType;
 
42
struct RenderLayer;
 
43
struct RenderResult;
 
44
struct ReportList;
 
45
struct Scene;
 
46
 
 
47
/* External Engine */
 
48
 
 
49
/* RenderEngineType.flag */
 
50
#define RE_INTERNAL                             1
 
51
#define RE_GAME                                 2
 
52
#define RE_USE_PREVIEW                  4
 
53
#define RE_USE_POSTPROCESS              8
 
54
#define RE_USE_SHADING_NODES    16
 
55
 
 
56
/* RenderEngine.flag */
 
57
#define RE_ENGINE_ANIMATION             1
 
58
#define RE_ENGINE_PREVIEW               2
 
59
#define RE_ENGINE_DO_DRAW               4
 
60
#define RE_ENGINE_DO_UPDATE             8
 
61
 
 
62
extern ListBase R_engines;
 
63
 
 
64
typedef struct RenderEngineType {
 
65
        struct RenderEngineType *next, *prev;
 
66
 
 
67
        /* type info */
 
68
        char idname[64]; // best keep the same size as BKE_ST_MAXNAME
 
69
        char name[64];
 
70
        int flag;
 
71
 
 
72
        void (*update)(struct RenderEngine *engine, struct Main *bmain, struct Scene *scene);
 
73
        void (*render)(struct RenderEngine *engine, struct Scene *scene);
 
74
 
 
75
        void (*view_update)(struct RenderEngine *engine, const struct bContext *context);
 
76
        void (*view_draw)(struct RenderEngine *engine, const struct bContext *context);
 
77
 
 
78
        /* RNA integration */
 
79
        ExtensionRNA ext;
 
80
} RenderEngineType;
 
81
 
 
82
typedef struct RenderEngine {
 
83
        RenderEngineType *type;
 
84
        void *py_instance;
 
85
 
 
86
        int flag;
 
87
        struct Object *camera_override;
 
88
 
 
89
        struct Render *re;
 
90
        ListBase fullresult;
 
91
        char *text;
 
92
} RenderEngine;
 
93
 
 
94
RenderEngine *RE_engine_create(RenderEngineType *type);
 
95
void RE_engine_free(RenderEngine *engine);
 
96
 
 
97
void RE_layer_load_from_file(struct RenderLayer *layer, struct ReportList *reports, const char *filename, int x, int y);
 
98
void RE_result_load_from_file(struct RenderResult *result, struct ReportList *reports, const char *filename);
 
99
 
 
100
struct RenderResult *RE_engine_begin_result(RenderEngine *engine, int x, int y, int w, int h);
 
101
void RE_engine_update_result(RenderEngine *engine, struct RenderResult *result);
 
102
void RE_engine_end_result(RenderEngine *engine, struct RenderResult *result);
 
103
 
 
104
int RE_engine_test_break(RenderEngine *engine);
 
105
void RE_engine_update_stats(RenderEngine *engine, const char *stats, const char *info);
 
106
void RE_engine_update_progress(RenderEngine *engine, float progress);
 
107
void RE_engine_report(RenderEngine *engine, int type, const char *msg);
 
108
 
 
109
int RE_engine_render(struct Render *re, int do_all);
 
110
 
 
111
int RE_engine_is_external(struct Render *re);
 
112
 
 
113
/* Engine Types */
 
114
 
 
115
void RE_engines_init(void);
 
116
void RE_engines_exit(void);
 
117
 
 
118
RenderEngineType *RE_engines_find(const char *idname);
 
119
 
 
120
#endif /* __RE_ENGINE_H__ */
 
121