Bugfix #3434
authorTon Roosendaal <ton@blender.org>
Mon, 21 Nov 2005 15:59:01 +0000 (15:59 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 21 Nov 2005 15:59:01 +0000 (15:59 +0000)
The OpenGL preview anim render calculated the camera matrix before
calling the animation updates, causing a lag when camera was parented.

source/blender/src/drawview.c

index ee8f943f31c5e53f004c5ca08b6ef0a8c719fde5..d6992edd4e5382950a2ec47400909ad99ac6811b 100644 (file)
@@ -2350,8 +2350,7 @@ void drawview3d_render(struct View3D *v3d)
        Base *base;
        Object *ob;
 
-       free_all_realtime_images();
-       reshadeall_displist();
+       update_for_newframe_muted();    /* first, since camera can be animated */
 
        v3d_windowmode= 1;
        setwinmatrixview3d(0);
@@ -2366,6 +2365,9 @@ void drawview3d_render(struct View3D *v3d)
        Mat4Invert(v3d->persinv, v3d->persmat);
        Mat4Invert(v3d->viewinv, v3d->viewmat);
 
+       free_all_realtime_images();
+       reshadeall_displist();
+       
        if(v3d->drawtype > OB_WIRE) {
                v3d->zbuf= TRUE;
                glEnable(GL_DEPTH_TEST);
@@ -2389,8 +2391,6 @@ void drawview3d_render(struct View3D *v3d)
        /* abuse! to make sure it doesnt draw the helpstuff */
        G.f |= G_SIMULATION;
 
-       update_for_newframe_muted();
-
        /* first draw set */
        if(G.scene->set) {