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:
2011-11-18 21:19:03 +00:00
parent c26c5f3852
commit 5429a701c4
7 changed files with 108 additions and 217 deletions

View File

@@ -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);
}