Bugfix for earlier commit, with OpenGL render the 3d view transforms
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 2 Dec 2007 14:48:24 +0000 (14:48 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 2 Dec 2007 14:48:24 +0000 (14:48 +0000)
were not always set correct.

source/blender/src/drawview.c
source/blender/src/renderwin.c

index daf2804e44efc17d81aa242ae46ccea672281af5..bd2fc642676225b378cac617f83970a11ba7e9a1 100644 (file)
@@ -3096,6 +3096,9 @@ void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4]
        Scene *sce;
        float v3dwinmat[4][4];
        
+       if(!winmat)
+               setwinmatrixview3d(winx, winy, NULL);
+
        setviewmatrixview3d();
        myloadmatrix(v3d->viewmat);
 
@@ -3103,8 +3106,6 @@ void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4]
        glMatrixMode(GL_PROJECTION);
        if(winmat)
                myloadmatrix(winmat);
-       else
-               setwinmatrixview3d(winx, winy, NULL);
        mygetmatrix(v3dwinmat);
        glMatrixMode(GL_MODELVIEW);
 
index 40306e6073fa8c7945785bbccee3c58d4d3876db..5db55ee3738c382e753b5d3f1ef74d92d30eed4c 100644 (file)
@@ -1247,7 +1247,7 @@ void do_ogl_view3d_render(Render *re, View3D *v3d, int winx, int winy)
 
        update_for_newframe_muted();    /* here, since camera can be animated */
 
-       if(v3d->camera) {
+       if(v3d->persp==2 && v3d->camera) {
                /* in camera view, use actual render winmat */
                RE_GetCameraWindow(re, v3d->camera, CFRA, winmat);
                drawview3d_render(v3d, winx, winy, winmat);