[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26517] trunk/blender/source/blender/ windowmanager/intern/wm_subwindow.c: Fix for problem drawing second level popup menus due to recent commit,
Brecht Van Lommel
brecht at blender.org
Mon Feb 1 17:50:23 CET 2010
Revision: 26517
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26517
Author: blendix
Date: 2010-02-01 17:50:23 +0100 (Mon, 01 Feb 2010)
Log Message:
-----------
Fix for problem drawing second level popup menus due to recent commit,
should find a better way to get this matrix for the UI.
Modified Paths:
--------------
trunk/blender/source/blender/windowmanager/intern/wm_subwindow.c
Modified: trunk/blender/source/blender/windowmanager/intern/wm_subwindow.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_subwindow.c 2010-02-01 15:32:55 UTC (rev 26516)
+++ trunk/blender/source/blender/windowmanager/intern/wm_subwindow.c 2010-02-01 16:50:23 UTC (rev 26517)
@@ -131,12 +131,14 @@
if(swin) {
/* used by UI, should find a better way to get the matrix there */
- float viewmat[4][4], winmat[4][4];
+ if(swinid == win->screen->mainwin) {
+ int width, height;
- glGetFloatv(GL_MODELVIEW_MATRIX, (float*)winmat);
- glGetFloatv(GL_PROJECTION_MATRIX, (float*)viewmat);
-
- mul_m4_m4m4(mat, viewmat, winmat);
+ wm_subwindow_getsize(win, swin->swinid, &width, &height);
+ orthographic_m4(mat, -0.375, (float)width-0.375, -0.375, (float)height-0.375, -100, 100);
+ }
+ else
+ glGetFloatv(GL_PROJECTION_MATRIX, (float*)mat);
}
}
More information about the Bf-blender-cvs
mailing list