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 19:50:23 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 19:50:23 +0300
commit3aff6529c0a724b0b029bcad0ede47c2d33e84a2 (patch)
tree034177dd549d480d168ba9aea115340fbf096bf4 /source/blender/windowmanager/intern/wm_subwindow.c
parent81cd4edfb66569f25d518d1fb3526acf7701c773 (diff)
Fix for problem drawing second level popup menus due to recent commit,
should find a better way to get this matrix for the UI.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_subwindow.c')
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 349cc26b618..97b3d3e800c 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -131,12 +131,14 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4])
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);
}
}