From 81cd4edfb66569f25d518d1fb3526acf7701c773 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 1 Feb 2010 15:32:55 +0000 Subject: 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. --- source/blender/editors/screen/area.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/screen/area.c') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 93f6542f9cb..f83af1d5167 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -106,7 +106,7 @@ void ED_region_pixelspace(ARegion *ar) int height= ar->winrct.ymax-ar->winrct.ymin+1; wmOrtho2(-0.375, (float)width-0.375, -0.375, (float)height-0.375); - wmLoadIdentity(); + glLoadIdentity(); } /* only exported for WM */ @@ -932,9 +932,8 @@ void ED_region_init(bContext *C, ARegion *ar) ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1; /* UI convention */ - wmLoadIdentity(); wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f); - + glLoadIdentity(); } void ED_region_toggle_hidden(bContext *C, ARegion *ar) -- cgit v1.2.3