Commit: 1dfb89d229304c302b8849756aa0ddd7e8d96488
Author: Julian Eisel
Date:   Fri Sep 23 01:40:19 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB1dfb89d229304c302b8849756aa0ddd7e8d96488

Merge branch 'master' into blender2.8

Conflicts:
        intern/ghost/intern/GHOST_ContextCGL.mm
        intern/ghost/intern/GHOST_WindowCocoa.mm
        source/blender/makesrna/intern/rna_main.c

===================================================================



===================================================================

diff --cc intern/cycles/blender/blender_sync.cpp
index be395b9,4ca202a..e77cc12
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@@ -143,6 -124,34 +123,28 @@@ bool BlenderSync::sync_recalc(
                }
        }
  
+       BL::BlendData::objects_iterator b_ob;
+ 
+       for(b_data.objects.begin(b_ob); b_ob != b_data.objects.end(); ++b_ob) {
+               if(b_ob->is_updated()) {
+                       object_map.set_recalc(*b_ob);
+                       light_map.set_recalc(*b_ob);
+               }
+ 
+               if(object_is_mesh(*b_ob)) {
+                       if(b_ob->is_updated_data() || b_ob->data().is_updated() 
||
+                          (dicing_prop_changed && 
object_subdivision_type(*b_ob, preview, experimental) != 
Mesh::SUBDIVISION_NONE))
+                       {
+                               BL::ID key = BKE_object_is_modified(*b_ob)? 
*b_ob: b_ob->data();
+                               mesh_map.set_recalc(key);
+                       }
+               }
+               else if(object_is_light(*b_ob)) {
+                       if(b_ob->is_updated_data() || b_ob->data().is_updated())
+                               light_map.set_recalc(*b_ob);
+               }
 -              
 -              if(b_ob->is_updated_data()) {
 -                      BL::Object::particle_systems_iterator b_psys;
 -                      for(b_ob->particle_systems.begin(b_psys); b_psys != 
b_ob->particle_systems.end(); ++b_psys)
 -                              particle_system_map.set_recalc(*b_ob);
 -              }
+       }
+ 
        BL::BlendData::meshes_iterator b_mesh;
  
        for(b_data.meshes.begin(b_mesh); b_mesh != b_data.meshes.end(); 
++b_mesh) {
diff --cc intern/ghost/intern/GHOST_ContextCGL.h
index c2f1ce1,dd49b81..8186eaa
--- a/intern/ghost/intern/GHOST_ContextCGL.h
+++ b/intern/ghost/intern/GHOST_ContextCGL.h
@@@ -134,10 -134,10 +134,12 @@@ private
        /** The OpenGL drawing context */
        NSOpenGLContext *m_openGLContext;
  
 +      bool m_coreProfile;
 +
        //static CGLEWContext *s_cglewContext;
  
+       const bool m_debug;
+ 
        /** The first created OpenGL context (for sharing display lists) */
        static NSOpenGLContext *s_sharedOpenGLContext;
        static int              s_sharedCount;
diff --cc intern/ghost/intern/GHOST_ContextCGL.mm
index 6a39d76,03c45f9..1ab0301
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@@ -59,26 -59,10 +59,27 @@@ GHOST_ContextCGL::GHOST_ContextCGL
          int contextResetNotificationStrategy)
      : GHOST_Context(stereoVisual, numOfAASamples),
        m_openGLView(openGLView),
-       m_openGLContext(nil)
+       m_openGLContext(nil),
+       m_debug(contextFlags)
  {
        assert(openGLView != nil);
 +
 +      // for now be very strict about OpenGL version requested
 +      switch (contextMajorVersion) {
 +              case 2:
 +                      assert(contextMinorVersion == 1);
 +                      assert(contextProfileMask == 0);
 +                      m_coreProfile = false;
 +                      break;
 +              case 3:
 +                      // Apple didn't implement 3.0 or 3.1
 +                      assert(contextMinorVersion == 2);
 +                      assert(contextProfileMask == 
GL_CONTEXT_CORE_PROFILE_BIT);
 +                      m_coreProfile = true;
 +                      break;
 +              default:
 +                      assert(false);
 +      }
  }
  
  
@@@ -189,12 -173,11 +190,14 @@@ static void makeAttribList
          bool stereoVisual,
          int numOfAASamples,
          bool needAlpha,
-         bool needStencil)
+         bool needStencil,
+         bool softwareGL)
  {
+       attribs.clear();
+ 
 +      attribs.push_back(NSOpenGLPFAOpenGLProfile);
 +      attribs.push_back(coreProfile ? NSOpenGLProfileVersion3_2Core : 
NSOpenGLProfileVersionLegacy);
 +      
        // Pixel Format Attributes for the windowed NSOpenGLContext
        attribs.push_back(NSOpenGLPFADoubleBuffer);
  
@@@ -207,9 -187,11 +207,10 @@@
        }
        else {
                attribs.push_back(NSOpenGLPFAAccelerated);
+               attribs.push_back(NSOpenGLPFANoRecovery);
        }
  
 -      /* Removed to allow 10.4 builds, and 2 GPUs rendering is not used 
anyway */
 -      //attribs.push_back(NSOpenGLPFAAllowOfflineRenderers);
 +      attribs.push_back(NSOpenGLPFAAllowOfflineRenderers); // for automatic 
GPU switching
  
        attribs.push_back(NSOpenGLPFADepthSize);
        attribs.push_back((NSOpenGLPixelFormatAttribute) 32);
@@@ -268,9 -258,12 +277,12 @@@ GHOST_TSuccess GHOST_ContextCGL::initia
        static const bool needStencil = false;
  #endif
  
-       makeAttribList(attribs, m_coreProfile, m_stereoVisual, 
m_numOfAASamples, needAlpha, needStencil);
- 
+       static bool softwareGL = getenv("BLENDER_SOFTWAREGL"); // command-line 
argument would be better
+       GLint major = 0, minor = 0;
        NSOpenGLPixelFormat *pixelFormat;
+       // TODO: keep pixel format for subsequent windows/contexts instead of 
recreating each time
+ 
 -      makeAttribList(attribs, m_stereoVisual, m_numOfAASamples, needAlpha, 
needStencil, softwareGL);
++      makeAttribList(attribs, coreProfile, m_stereoVisual, m_numOfAASamples, 
needAlpha, needStencil, softwareGL);
  
        pixelFormat = [[NSOpenGLPixelFormat alloc] 
initWithAttributes:&attribs[0]];
  
@@@ -281,7 -274,7 +293,7 @@@
                // (Now that I think about it, does WGL really require the code 
that it has for finding a lesser match?)
  
                attribs.clear();
-               makeAttribList(attribs, m_coreProfile, m_stereoVisual, 0, 
needAlpha, needStencil);
 -              makeAttribList(attribs, m_stereoVisual, 0, needAlpha, 
needStencil, softwareGL);
++              makeAttribList(attribs, coreProfile, m_stereoVisual, 0, 
needAlpha, needStencil, softwareGL);
                pixelFormat = [[NSOpenGLPixelFormat alloc] 
initWithAttributes:&attribs[0]];
        }
  
diff --cc source/blender/makesrna/intern/rna_main.c
index 6686b23,d432f08..59f079b
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@@ -329,38 -335,39 +329,38 @@@ void RNA_def_main(BlenderRNA *brna
  
        /* plural must match idtypes in readblenentry.c */
        MainCollectionDef lists[] = {
-               {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", 
"Camera datablocks", RNA_def_main_cameras},
-               {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene 
datablocks", RNA_def_main_scenes},
-               {"objects", "Object", "rna_Main_object_begin", "Objects", 
"Object datablocks", RNA_def_main_objects},
-               {"materials", "Material", "rna_Main_mat_begin", "Materials", 
"Material datablocks", RNA_def_main_materials},
-               {"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node 
Groups", "Node group datablocks", RNA_def_main_node_groups},
-               {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh 
datablocks", RNA_def_main_meshes},
-               {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp 
datablocks", RNA_def_main_lamps},
-               {"libraries", "Library", "rna_Main_library_begin", "Libraries", 
"Library datablocks", RNA_def_main_libraries},
-               {"screens", "Screen", "rna_Main_screen_begin", "Screens", 
"Screen datablocks", RNA_def_main_screens},
-               {"window_managers", "WindowManager", "rna_Main_wm_begin", 
"Window Managers", "Window manager datablocks", RNA_def_main_window_managers},
-               {"images", "Image", "rna_Main_image_begin", "Images", "Image 
datablocks", RNA_def_main_images},
-               {"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", 
"Lattice datablocks", RNA_def_main_lattices},
-               {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve 
datablocks", RNA_def_main_curves},
-               {"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", 
"Metaball datablocks", RNA_def_main_metaballs},
-               {"fonts", "VectorFont", "rna_Main_font_begin", "Vector Fonts", 
"Vector font datablocks", RNA_def_main_fonts},
-               {"textures", "Texture", "rna_Main_tex_begin", "Textures", 
"Texture datablocks", RNA_def_main_textures},
-               {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush 
datablocks", RNA_def_main_brushes},
-               {"worlds", "World", "rna_Main_world_begin", "Worlds", "World 
datablocks", RNA_def_main_worlds},
-               {"groups", "Group", "rna_Main_group_begin", "Groups", "Group 
datablocks", RNA_def_main_groups},
-               {"shape_keys", "Key", "rna_Main_key_begin", "Shape Keys", 
"Shape Key datablocks", NULL},
-               {"texts", "Text", "rna_Main_text_begin", "Texts", "Text 
datablocks", RNA_def_main_texts},
-               {"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", 
"Speaker datablocks", RNA_def_main_speakers},
-               {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound 
datablocks", RNA_def_main_sounds},
-               {"armatures", "Armature", "rna_Main_armature_begin", 
"Armatures", "Armature datablocks", RNA_def_main_armatures},
-               {"actions", "Action", "rna_Main_action_begin", "Actions", 
"Action datablocks", RNA_def_main_actions},
-               {"palettes", "Palette", "rna_Main_palettes_begin", "Palettes", 
"Palette datablocks", RNA_def_main_palettes},
-               {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", 
"Grease Pencil", "Grease Pencil datablocks", RNA_def_main_gpencil},
-               {"movieclips", "MovieClip", "rna_Main_movieclips_begin", "Movie 
Clips", "Movie Clip datablocks", RNA_def_main_movieclips},
-               {"masks", "Mask", "rna_Main_masks_begin", "Masks", "Masks 
datablocks", RNA_def_main_masks},
-               {"linestyles", "FreestyleLineStyle", 
"rna_Main_linestyle_begin", "Line Styles", "Line Style datablocks", 
RNA_def_main_linestyles},
-               {"cache_files", "CacheFile", "rna_Main_cachefiles_begin", 
"Cache Files", "Cache Files datablocks", RNA_def_main_cachefiles},
-               {"paint_curves", "PaintCurve", "rna_Main_paintcurves_begin", 
"Paint Curves", "Paint Curves datablocks", RNA_def_main_paintcurves},
+               {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", 
"Camera data-blocks", RNA_def_main_cameras},
+               {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene 
data-blocks", RNA_def_main_scenes},
+               {"objects", "Object", "rna_Main_object_begin", "Objects", 
"Object data-blocks", RNA_def_main_objects},
+               {"materials", "Material", "rna_Main_mat_begin", "Materials", 
"Material data-blocks", RNA_def_main_materials},
+               {"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node 
Groups", "Node group data-blocks", RNA_def_main_node_groups},
+               {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh 
data-blocks", RNA_def_main_meshes},
+               {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp 
data-blocks", RNA_def_main_lamps},
+               {"libraries", "Library", "rna_Main_library_begin", "Libraries", 
"Library data-blocks", RNA_def_main_libraries},
+               {"screens", "Screen", "rna_Main_screen_begin", "Screens", 
"Screen data-blocks", RNA_def_main_screens},
+               {"window_managers", "WindowManager", "rna_Main_wm_begin", 
"Window Managers", "Window manager data-blocks", RNA_def_main_window_managers},
+               {"images", "Image", "rna_Main_image_begin", "Images", "Image 
data-blocks", RNA_def_main_images},
+               {"lattices", "Lat

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to