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/interface/view2d.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/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 12265715415..4a648e6051b 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -995,7 +995,7 @@ void UI_view2d_view_ortho(const bContext *C, View2D *v2d)
wmOrtho2(curmasked.xmin-xofs, curmasked.xmax-xofs, curmasked.ymin-yofs, curmasked.ymax-yofs);
/* XXX is this necessary? */
- wmLoadIdentity();
+ glLoadIdentity();
}
/* Set view matrices to only use one axis of 'cur' only
@@ -1024,7 +1024,7 @@ void UI_view2d_view_orthoSpecial(const bContext *C, View2D *v2d, short xaxis)
wmOrtho2(-xofs, ar->winx-xofs, curmasked.ymin-yofs, curmasked.ymax-yofs);
/* XXX is this necessary? */
- wmLoadIdentity();
+ glLoadIdentity();
}
@@ -1036,7 +1036,7 @@ void UI_view2d_view_restore(const bContext *C)
int height= ar->winrct.ymax-ar->winrct.ymin+1;
wmOrtho2(0.0f, (float)width, 0.0f, (float)height);
- wmLoadIdentity();
+ glLoadIdentity();
// ED_region_pixelspace(CTX_wm_region(C));
}
@@ -2040,7 +2040,10 @@ void UI_view2d_text_cache_draw(ARegion *ar)
{
View2DString *v2s;
- // wmPushMatrix();
+ // glMatrixMode(GL_PROJECTION);
+ // glPushMatrix();
+ // glMatrixMode(GL_MODELVIEW);
+ // glPushMatrix();
ED_region_pixelspace(ar);
for(v2s= strings.first; v2s; v2s= v2s->next) {
@@ -2062,7 +2065,10 @@ void UI_view2d_text_cache_draw(ARegion *ar)
}
}
- // wmPopMatrix();
+ // glMatrixMode(GL_PROJECTION);
+ // glPopMatrix();
+ // glMatrixMode(GL_MODELVIEW);
+ // glPopMatrix();
if(strings.first)
BLI_freelistN(&strings);