~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to intern/cycles/app/cycles_test.cpp

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
 
67
67
static void session_print_status()
68
68
{
69
 
        int sample;
 
69
        int sample, tile;
70
70
        double total_time, sample_time;
71
71
        string status, substatus;
72
72
 
73
73
        /* get status */
74
 
        options.session->progress.get_sample(sample, total_time, sample_time);
 
74
        sample = options.session->progress.get_sample();
 
75
        options.session->progress.get_tile(tile, total_time, sample_time);
75
76
        options.session->progress.get_status(status, substatus);
76
77
 
77
78
        if(substatus != "")
111
112
 
112
113
static void scene_init(int width, int height)
113
114
{
114
 
        options.scene = new Scene(options.scene_params);
 
115
        options.scene = new Scene(options.scene_params, options.session_params.device);
115
116
        xml_read_file(options.scene, options.filepath.c_str());
116
117
        
117
118
        if (width == 0 || height == 0) {
147
148
        latency = (elapsed - last);
148
149
        last = elapsed;
149
150
 
150
 
        int sample;
 
151
        int sample, tile;
151
152
        double total_time, sample_time;
152
153
        string status, substatus;
153
154
 
154
 
        progress.get_sample(sample, total_time, sample_time);
 
155
        sample = progress.get_sample();
 
156
        progress.get_tile(tile, total_time, sample_time);
155
157
        progress.get_status(status, substatus);
156
158
 
157
159
        if(substatus != "")
172
174
 
173
175
static void resize(int width, int height)
174
176
{
175
 
        options.width= width;
176
 
        options.height= height;
 
177
        options.width = width;
 
178
        options.height = height;
177
179
 
178
180
        if(options.session)
179
181
                options.session->reset(session_buffer_params(), options.session_params.samples);
197
199
 
198
200
static void options_parse(int argc, const char **argv)
199
201
{
200
 
        options.width= 0;
201
 
        options.height= 0;
 
202
        options.width = 0;
 
203
        options.height = 0;
202
204
        options.filepath = "";
203
205
        options.session = NULL;
204
206
        options.quiet = false;
245
247
                NULL);
246
248
        
247
249
        if(ap.parse(argc, argv) < 0) {
248
 
                fprintf(stderr, "%s\n", ap.error_message().c_str());
 
250
                fprintf(stderr, "%s\n", ap.geterror().c_str());
249
251
                ap.usage();
250
252
                exit(EXIT_FAILURE);
251
253
        }
270
272
                options.scene_params.shadingsystem = SceneParams::OSL;
271
273
        else if(ssname == "svm")
272
274
                options.scene_params.shadingsystem = SceneParams::SVM;
 
275
                
 
276
        /* Progressive rendering */
 
277
        options.session_params.progressive = true;
273
278
 
274
279
        /* find matching device */
275
280
        DeviceType device_type = Device::type_from_string(devicename.c_str());
321
326
 
322
327
int main(int argc, const char **argv)
323
328
{
324
 
        path_init("../build/bin/2.59/scripts/addons/cycles/");
 
329
        path_init();
325
330
 
326
331
        options_parse(argc, argv);
327
332