diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-03-26 12:57:30 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-03-26 13:58:53 +0400 |
commit | 74518b28267e9b18199212fbaa3c689fa018d20c (patch) | |
tree | 71a4ea9f274f4a4301c48060984df0802af46c78 /intern/cycles/blender/blender_session.cpp | |
parent | 3b0832dd869b4c27f0b976e36134332cf427430c (diff) |
Fix T39420: Cycles viewport/preview flickers, when moving mouse across editors
Issue was caused by the wrong usage of OCIO GLSL binding API. To make it
work properly on pre-GLSL-1.3 drivers shader is to be enabled after the
texture is binded to the opengl context. Otherwise it wouldn't know the
proper texture size.
This is actually a regression in 2.70 and to be ported to 'a'.
Diffstat (limited to 'intern/cycles/blender/blender_session.cpp')
-rw-r--r-- | intern/cycles/blender/blender_session.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp index ef578493901..09e7472caf2 100644 --- a/intern/cycles/blender/blender_session.cpp +++ b/intern/cycles/blender/blender_session.cpp @@ -592,16 +592,14 @@ 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); + DeviceDrawParams draw_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) { + draw_params.bind_display_space_shader_cb = function_bind(&BL::RenderEngine::bind_display_space_shader, &b_engine, b_scene); + draw_params.unbind_display_space_shader_cb = function_bind(&BL::RenderEngine::unbind_display_space_shader, &b_engine); + } - if(session->params.display_buffer_linear) - b_engine.unbind_display_space_shader(); - - return draw_ok; + return !session->draw(buffer_params, draw_params); } void BlenderSession::get_status(string& status, string& substatus) |