~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/gameengine/GamePlayer/netscape/src/ketsji/KXH_engine_data_wraps.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
 
 * $Id: KXH_engine_data_wraps.h 26841 2010-02-12 13:34:04Z campbellbarton $
3
 
 *
4
 
 * ***** BEGIN GPL LICENSE BLOCK *****
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU General Public License
8
 
 * as published by the Free Software Foundation; either version 2
9
 
 * of the License, or (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 * GNU General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software Foundation,
18
 
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
 
 *
20
 
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21
 
 * All rights reserved.
22
 
 *
23
 
 * The Original Code is: all of this file.
24
 
 *
25
 
 * Contributor(s): none yet.
26
 
 *
27
 
 * ***** END GPL LICENSE BLOCK *****
28
 
 * Data wraps for the engine.
29
 
 */
30
 
 
31
 
#ifndef KXH_ENGINE_DATA_WRAPS_H
32
 
#define KXH_ENGINE_DATA_WRAPS_H
33
 
 
34
 
 
35
 
#include "PLG_plugin_handles.h"
36
 
#include "prthread.h"
37
 
 
38
 
/**********************************
39
 
 * Begin Blender include block
40
 
 **********************************/
41
 
#ifdef __cplusplus
42
 
extern "C"
43
 
{
44
 
#endif  // __cplusplus
45
 
#include "BLI_blenlib.h"
46
 
#include "BLO_readfile.h"
47
 
#include "DNA_scene_types.h"
48
 
#include "BKE_blender.h"
49
 
#include "BKE_report.h"
50
 
#ifdef __cplusplus
51
 
}
52
 
#endif // __cplusplus
53
 
/**********************************
54
 
 * End Blender include block
55
 
 **********************************/
56
 
 
57
 
 
58
 
#ifdef __cplusplus
59
 
extern "C" {
60
 
#endif
61
 
 
62
 
        /* forwards: */
63
 
        class KX_KetsjiEngine;
64
 
        class GPC_System;
65
 
        class GPC_Canvas;
66
 
        class RAS_IRasterizer;
67
 
        class RAS_IRenderTools;
68
 
        class GPC_KeyboardDevice;
69
 
        class GPC_MouseDevice;
70
 
        class NG_NetworkDeviceInterface;
71
 
        class SND_IAudioDevice;
72
 
        class KX_BlenderSceneConverter;
73
 
        class GPC_RawImage;
74
 
        class GPC_RawImage;
75
 
        struct BlendFileData;
76
 
        struct _thread_data_wrap;
77
 
 
78
 
        enum KXH_STATE {
79
 
                KXH_NO_STATE = 0,
80
 
                KXH_INIT,                     // 1
81
 
                KXH_SHOW_FG_COLOR,            // 2
82
 
                KXH_TEST_LOADING_FILE_TYPE,   // 3
83
 
                KXH_PLAY_LOADING_ANIM,        // 4
84
 
                KXH_TEST_MAIN_FILE,           // 5
85
 
                KXH_ADD_LOGOS,                // 6
86
 
                KXH_PLAY_MAIN_FILE,           // 7
87
 
                KXH_AWAITING_NEW_STREAM,      // 8
88
 
                KXH_GL_ERROR_STATE,           // 9
89
 
                KXH_CLEAN_UP,                 // 10
90
 
                KXH_MAX_STATE                 // 11
91
 
        };
92
 
 
93
 
 
94
 
        enum KXH_MAIN_FILE_STATE {
95
 
                KXH_MAIN_FILE_NO_STATE,
96
 
                KXH_MAIN_FILE_IS_PUBLISHER_FILE,
97
 
                KXH_MAIN_FILE_IS_NOT_PUBLISHER_FILE,
98
 
                KXH_MAIN_FILE_CORRUPT,
99
 
                KXH_MAIN_FILE_MAX_STATE 
100
 
        };
101
 
 
102
 
 
103
 
        typedef struct _ketsji_engine_data {
104
 
 
105
 
                /** Flag that terminates the plugin. */ 
106
 
                bool terminate;
107
 
 
108
 
                /** Flag to raise a request for termination */
109
 
                bool termination_request;
110
 
 
111
 
                /** Reference to the plugin resources (gl and x contexts). */
112
 
                PLA_plugin_handle plugin;
113
 
 
114
 
                /** Reference for getting the references right. */
115
 
                struct _thread_data_wrap* thread_data;
116
 
 
117
 
                /** The active gameengine. */
118
 
                KX_KetsjiEngine* kx_engine;
119
 
 
120
 
                /** The engine's logic system. */
121
 
                GPC_System* logic_system;
122
 
 
123
 
                /** The canvas. We sometimes need to send resizes and such. */
124
 
                GPC_Canvas* canvas_device;
125
 
 
126
 
                /** The rasterizer */
127
 
                RAS_IRasterizer* rasterizer;
128
 
        
129
 
                /** The Rendertools */
130
 
                RAS_IRenderTools* rendertools;
131
 
        
132
 
                /** The keyboarddevice */
133
 
                GPC_KeyboardDevice* keyboarddevice;
134
 
        
135
 
                /** The mousedevice */
136
 
                GPC_MouseDevice* mousedevice;
137
 
        
138
 
                /** The network device */
139
 
                NG_NetworkDeviceInterface* net_dev;
140
 
 
141
 
                /** The audiodevice */
142
 
                SND_IAudioDevice* audiodevice;
143
 
        
144
 
                /** a blend-to-kx scene converter */
145
 
                KX_BlenderSceneConverter* converter;
146
 
 
147
 
                /** State of the gameengine. Refer to the spec to see the
148
 
                 * meaning of the names. */
149
 
                KXH_STATE state;
150
 
 
151
 
                /** Is the gameengine initialised? */
152
 
                bool kx_initialized;
153
 
 
154
 
                /** The target blend file */
155
 
                struct BlendFileData *blendfile;
156
 
 
157
 
                /** Did the main file retrieval fail for some reason? */
158
 
                bool blendfile_failed;
159
 
 
160
 
                /** The loading anim resource. */
161
 
                struct BlendFileData *loading_anim;
162
 
                /** Did the loading anim file retrieval fail for some reason? */
163
 
                bool loading_anim_failed;
164
 
 
165
 
                /** Placeholder for blender logo, if needed */
166
 
                GPC_RawImage* blender_logo;
167
 
 
168
 
                /** Placeholder for url blender logo, if needed */
169
 
                GPC_RawImage* blender_url_logo;
170
 
 
171
 
                /** Time in 10e-6 seconds to the next redraw request. */
172
 
                int sleep_time;
173
 
 
174
 
                /** Restart with new streaming url? */
175
 
                bool replacing_url_requested;
176
 
 
177
 
                bool new_url_requested;
178
 
 
179
 
        } ketsji_engine_data;
180
 
 
181
 
 
182
 
        typedef struct _thread_data_wrap {
183
 
                /** Thread for the plugin. This is retained, so we can properly
184
 
                    cancel and join on termination. */
185
 
                PRThread* t;
186
 
 
187
 
                /** Handle to the game data, so we can send the terminate signal. */
188
 
                ketsji_engine_data* ked;
189
 
        
190
 
                /** Handle to the plugin, for resources. */
191
 
                PLA_plugin_handle ph;
192
 
 
193
 
        } thread_data_wrap;
194
 
 
195
 
#ifdef __cplusplus
196
 
}
197
 
#endif
198
 
 
199
 
#endif
200