diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-20 16:25:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-20 16:25:37 +0400 |
commit | 72d2d05770a721986986c137a5cbc36cb796062f (patch) | |
tree | c713c496567433e0b7362c2569f113ed5cb042a7 /intern/cycles/app/cycles_test.cpp | |
parent | 81c635a3bb194931384d9533e02bff7fc09307b0 (diff) |
Cycles: border rendering support, includes some refactoring in how pixels are
accessed on devices.
Diffstat (limited to 'intern/cycles/app/cycles_test.cpp')
-rw-r--r-- | intern/cycles/app/cycles_test.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/intern/cycles/app/cycles_test.cpp b/intern/cycles/app/cycles_test.cpp index 27e53ded6db..83816727404 100644 --- a/intern/cycles/app/cycles_test.cpp +++ b/intern/cycles/app/cycles_test.cpp @@ -82,10 +82,21 @@ static void session_print_status() session_print(status); } +static BufferParams session_buffer_params() +{ + BufferParams buffer_params; + buffer_params.width = options.width; + buffer_params.height = options.height; + buffer_params.full_width = options.width; + buffer_params.full_height = options.height; + + return buffer_params; +} + static void session_init() { options.session = new Session(options.session_params); - options.session->reset(options.width, options.height, options.session_params.samples); + options.session->reset(session_buffer_params(), options.session_params.samples); options.session->scene = options.scene; if(options.session_params.background && !options.quiet) @@ -151,7 +162,7 @@ static void display_info(Progress& progress) static void display() { - options.session->draw(options.width, options.height); + options.session->draw(session_buffer_params()); display_info(options.session->progress); } @@ -162,13 +173,13 @@ static void resize(int width, int height) options.height= height; if(options.session) - options.session->reset(options.width, options.height, options.session_params.samples); + options.session->reset(session_buffer_params(), options.session_params.samples); } void keyboard(unsigned char key) { if(key == 'r') - options.session->reset(options.width, options.height, options.session_params.samples); + options.session->reset(session_buffer_params(), options.session_params.samples); else if(key == 27) // escape options.session->progress.set_cancel("Cancelled"); } |