diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-01 15:14:02 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-01 15:14:02 +0400 |
commit | 1d7bf727ff50a9dc21de3c002311eb670fc680b4 (patch) | |
tree | 049fcb0c54369a739badc8d994390377c915a815 /source/blender/gpu/intern | |
parent | c9c76a9a68ff9f0c32c6a1f77d386349ca5abaca (diff) |
Fix #32695: Can't disable color management for 3D view
Made it so viewport will disable color management if display device set to None.
This solves couple of regressions, mainly related on old BGE files and made
None display behave exactly as old color management disabled.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 5 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 962bb0aed22..956c76aec20 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1209,10 +1209,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O GPUBlendMode alphablend; int a; - /* OCIO_TODO: assume color management is always enabled. could be nice to support real display transform here, - * but that's not so important and could be done later - */ - int gamma = TRUE; + int gamma = BKE_scene_check_color_management_enabled(scene); int new_shading_nodes = BKE_scene_use_new_shading_nodes(scene); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index dd92b561235..4732586b912 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -389,10 +389,8 @@ void gpu_material_add_node(GPUMaterial *material, GPUNode *node) int GPU_material_do_color_management(GPUMaterial *mat) { - /* OCIO_TODO: for now assume scene always does color management. probably could be - * improved in the future to support real display transform - * also probably we'll need to get rid ofgame engine's color management flag - */ + if (!BKE_scene_check_color_management_enabled(mat->scene)) + return FALSE; return !((mat->scene->gm.flag & GAME_GLSL_NO_COLOR_MANAGEMENT)); } |