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/space_view3d.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/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index a65521cd0fb..6b653ccba89 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -172,10 +172,11 @@ RegionView3D *ED_view3d_context_rv3d(bContext *C)
*/
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d)
{
- wmMultMatrix(ob->obmat);
/* local viewmat and persmat, to calculate projections */
- wmGetMatrix(rv3d->viewmatob);
- wmGetSingleMatrix(rv3d->persmatob);
+ mul_m4_m4m4(rv3d->viewmatob, ob->obmat, rv3d->viewmat);
+ mul_m4_m4m4(rv3d->persmatob, ob->obmat, rv3d->persmat);
+
+ glLoadMatrixf(rv3d->viewmatob);
/* initializes object space clipping, speeds up clip tests */
ED_view3d_local_clipping(rv3d, ob->obmat);