Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 18:32:55 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 18:32:55 +0300
commit81cd4edfb66569f25d518d1fb3526acf7701c773 (patch)
tree57091c1d5d1c1cd8189c932a881ed203eb595d3d /source/blender/editors/space_view3d/view3d_view.c
parent90e2b22feeb142d190b7aa2dd1e98fdd48f572bc (diff)
Fix #20891: opengl animation render could mess up the view.
The problem was that wmPushMatrix/wmOrtho/.. and similar functions did not work well for offscreen rendering. It would have been possible to make a fake subwindow for this, but I decided to just remove this extra layer as it does not seem to have much purpose and has been quite confusing when trying to fix other bugs. The relevant matrices are already stored in RegionView3D so there will be no increase in calls to glGetFloat, which may have been a performance reason to use this system in the past.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index c4f5f37c5e5..f74978fd317 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -104,9 +104,9 @@ void view3d_operator_needs_opengl(const bContext *C)
wmSubWindowSet(CTX_wm_window(C), ar->swinid);
glMatrixMode(GL_PROJECTION);
- wmLoadMatrix(rv3d->winmat);
+ glLoadMatrixf(rv3d->winmat);
glMatrixMode(GL_MODELVIEW);
- wmLoadMatrix(rv3d->viewmat);
+ glLoadMatrixf(rv3d->viewmat);
}
}
@@ -1074,13 +1074,10 @@ void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for pick
else wmFrustum(x1, x2, y1, y2, clipsta, clipend);
}
- /* not sure what this was for? (ton) */
- glMatrixMode(GL_PROJECTION);
- wmGetMatrix(rv3d->winmat);
- glMatrixMode(GL_MODELVIEW);
+ /* update matrix in 3d view region */
+ glGetFloatv(GL_PROJECTION_MATRIX, (float*)rv3d->winmat);
}
-
static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short smooth)
{
float bmat[4][4];