[Bf-blender-cvs] [091cc94379a] soc-2019-openxr: Use fixed lighting, don't make it rotate with view rotation

Julian Eisel noreply at git.blender.org
Wed Jul 24 16:48:23 CEST 2019


Commit: 091cc94379a2976176f0ae93721cfb2239a60e55
Author: Julian Eisel
Date:   Wed Jul 24 16:41:46 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rB091cc94379a2976176f0ae93721cfb2239a60e55

Use fixed lighting, don't make it rotate with view rotation

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

M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/windowmanager/intern/wm_xr.c

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

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index a21670a6f7f..8d8b314e525 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1657,8 +1657,6 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
     v3d.flag2 = V3D_HIDE_OVERLAYS;
   }
 
-  v3d.shading.background_type = V3D_SHADING_BACKGROUND_WORLD;
-
   rv3d.persp = RV3D_PERSP;
   v3d.clip_start = clip_start;
   v3d.clip_end = clip_end;
diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c
index e27c83ad6ca..4f7d2430ba9 100644
--- a/source/blender/windowmanager/intern/wm_xr.c
+++ b/source/blender/windowmanager/intern/wm_xr.c
@@ -306,6 +306,8 @@ static GHOST_ContextHandle wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view
   glClear(GL_DEPTH_BUFFER_BIT);
 
   BKE_screen_view3d_shading_init(&shading);
+  shading.flag |= V3D_SHADING_WORLD_ORIENTATION;
+  shading.background_type = V3D_SHADING_BACKGROUND_WORLD;
   ED_view3d_draw_offscreen_simple(CTX_data_depsgraph(C),
                                   CTX_data_scene(C),
                                   &shading,



More information about the Bf-blender-cvs mailing list