Camera: more code refactoring, adding a function to create CameraParams from
3d view, deduplicating the complex code for setting up the viewplane.
This commit is contained in:
@@ -147,7 +147,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
|
||||
rctf viewplane;
|
||||
float clipsta, clipend;
|
||||
|
||||
int is_ortho= ED_view3d_viewplane_get(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend, NULL);
|
||||
int is_ortho= ED_view3d_viewplane_get(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend);
|
||||
if(is_ortho) orthographic_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, -clipend, clipend);
|
||||
else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user