Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / blender_sync.cpp
index f362eade954b9098c4fe4e3676755866246e60b2..a2d865f919384bab82be738ecceafa619dbf7ec5 100644 (file)
@@ -44,6 +44,7 @@ CCL_NAMESPACE_BEGIN
 
 BlenderSync::BlenderSync(BL::RenderEngine& b_engine,
                          BL::BlendData& b_data,
+                         BL::Depsgraph& b_depsgraph,
                          BL::Scene& b_scene,
                          Scene *scene,
                          bool preview,
@@ -51,6 +52,7 @@ BlenderSync::BlenderSync(BL::RenderEngine& b_engine,
                          bool is_cpu)
 : b_engine(b_engine),
   b_data(b_data),
+  b_depsgraph(b_depsgraph),
   b_scene(b_scene),
   shader_map(&scene->shaders),
   object_map(&scene->objects),
@@ -799,17 +801,8 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine,
                params.shadingsystem = SHADINGSYSTEM_OSL;
        
        /* color managagement */
-#ifdef GLEW_MX
-       /* When using GLEW MX we need to check whether we've got an OpenGL
-        * context for current window. This is because command line rendering
-        * doesn't have OpenGL context actually.
-        */
-       if(glewGetContext() != NULL)
-#endif
-       {
-               params.display_buffer_linear = GLEW_ARB_half_float_pixel &&
-                                              b_engine.support_display_space_shader(b_scene);
-       }
+       params.display_buffer_linear = GLEW_ARB_half_float_pixel &&
+                                      b_engine.support_display_space_shader(b_scene);
 
        if(b_engine.is_preview()) {
                /* For preview rendering we're using same timeout as