Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/session.cpp
| Show First 20 Lines • Show All 911 Lines • ▼ Show 20 Lines | bool Session::update_scene() | ||||
| /* update camera if dimensions changed for progressive render. the camera | /* update camera if dimensions changed for progressive render. the camera | ||||
| * knows nothing about progressive or cropped rendering, it just gets the | * knows nothing about progressive or cropped rendering, it just gets the | ||||
| * image dimensions passed in */ | * image dimensions passed in */ | ||||
| Camera *cam = scene->camera; | Camera *cam = scene->camera; | ||||
| int width = tile_manager.state.buffer.full_width; | int width = tile_manager.state.buffer.full_width; | ||||
| int height = tile_manager.state.buffer.full_height; | int height = tile_manager.state.buffer.full_height; | ||||
| int resolution = tile_manager.state.resolution_divider; | int resolution = tile_manager.state.resolution_divider; | ||||
| if (width != cam->width || height != cam->height || resolution != cam->resolution) { | cam->set_width(width); | ||||
| cam->width = width; | cam->set_height(height); | ||||
| cam->height = height; | cam->set_resolution(resolution); | ||||
brecht: `resolution` should also not be a public struct member, and setting width/heigh/resolution and… | |||||
| cam->resolution = resolution; | |||||
| cam->tag_update(); | |||||
| } | |||||
| /* number of samples is needed by multi jittered | /* number of samples is needed by multi jittered | ||||
| * sampling pattern and by baking */ | * sampling pattern and by baking */ | ||||
| Integrator *integrator = scene->integrator; | Integrator *integrator = scene->integrator; | ||||
| BakeManager *bake_manager = scene->bake_manager; | BakeManager *bake_manager = scene->bake_manager; | ||||
| if (integrator->sampling_pattern != SAMPLING_PATTERN_SOBOL || bake_manager->get_baking()) { | if (integrator->sampling_pattern != SAMPLING_PATTERN_SOBOL || bake_manager->get_baking()) { | ||||
| int aa_samples = tile_manager.num_samples; | int aa_samples = tile_manager.num_samples; | ||||
| ▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines | |||||
resolution should also not be a public struct member, and setting width/heigh/resolution and tagging update could be wrapped in a function rather than using friend class Session?