[Bf-blender-cvs] [cddf043ccac] soc-2019-openxr: Cleanup: Don't pass unused lens value

Julian Eisel noreply at git.blender.org
Tue Sep 17 19:17:04 CEST 2019


Commit: cddf043ccace7c7fa5b0da73c30168d89a8aeb10
Author: Julian Eisel
Date:   Tue Sep 17 19:16:14 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rBcddf043ccace7c7fa5b0da73c30168d89a8aeb10

Cleanup: Don't pass unused lens value

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

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

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

diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index dfbf830eaf0..6f8c7c7485e 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -586,7 +586,6 @@ void ED_view3d_draw_offscreen_simple(struct Depsgraph *depsgraph,
                                      float winmat[4][4],
                                      float clip_start,
                                      float clip_end,
-                                     float lens,
                                      bool do_sky,
                                      bool is_persp,
                                      const char *viewname,
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 8a67c388fe7..19b199de6a2 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1676,7 +1676,7 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph,
 
 /**
  * Creates own fake 3d views (wrapping #ED_view3d_draw_offscreen). Similar too
- * #ED_view_draw_offscreen_imbuf_simple.
+ * #ED_view_draw_offscreen_imbuf_simple, but takes view/projection matrices as arguments.
  */
 void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
                                      Scene *scene,
@@ -1689,7 +1689,6 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
                                      float winmat[4][4],
                                      float clip_start,
                                      float clip_end,
-                                     float lens,
                                      bool do_sky,
                                      bool is_persp,
                                      const char *viewname,
@@ -1738,7 +1737,8 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
   rv3d.persp = RV3D_PERSP;
   v3d.clip_start = clip_start;
   v3d.clip_end = clip_end;
-  v3d.lens = lens;
+  /* Actually not used since we pass in the projection matrix. */
+  v3d.lens = 0;
 
   ED_view3d_draw_offscreen(depsgraph,
                            scene,
diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c
index 0bd5628d708..5295a71ab0c 100644
--- a/source/blender/windowmanager/intern/wm_xr.c
+++ b/source/blender/windowmanager/intern/wm_xr.c
@@ -449,7 +449,6 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata)
   bContext *C = customdata;
   wmXrSurfaceData *surface_data = g_xr_surface->customdata;
   const float clip_start = 0.01f, clip_end = 500.0f;
-  const float lens = 50.0f;
   const rcti rect = {
       .xmin = 0, .ymin = 0, .xmax = draw_view->width - 1, .ymax = draw_view->height - 1};
 
@@ -485,7 +484,6 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata)
                                   winmat,
                                   clip_start,
                                   clip_end,
-                                  lens,
                                   true,
                                   true,
                                   NULL,



More information about the Bf-blender-cvs mailing list