Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-31 03:49:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-31 03:49:38 +0400
commit29f6616d609fbd92cf313b0fdec555c2fcb4ede0 (patch)
treee0c9500368c5210071cb841ea86f5674b0cf6f25 /intern/cycles/blender/blender_session.cpp
parent60ff60dcdc9f43891fb8a19e10f9bb7964a539bf (diff)
Cycles: viewport render now takes scene color management settings into account,
except for curves, that's still missing from the OpenColorIO GLSL shader. The pixels are stored in a half float texture, converterd from full float with native GPU instructions and SIMD on the CPU, so it should be pretty quick. Using a GLSL shader is useful for GPU render because it avoids a copy through CPU memory.
Diffstat (limited to 'intern/cycles/blender/blender_session.cpp')
-rw-r--r--intern/cycles/blender/blender_session.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 939eed2c77b..23390060118 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -588,7 +588,15 @@ bool BlenderSession::draw(int w, int h)
/* draw */
BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
- return !session->draw(buffer_params);
+ if(session->params.display_buffer_linear)
+ b_engine.bind_display_space_shader(b_scene);
+
+ bool draw_ok = !session->draw(buffer_params);
+
+ if(session->params.display_buffer_linear)
+ b_engine.unbind_display_space_shader();
+
+ return draw_ok;
}
void BlenderSession::get_status(string& status, string& substatus)