Fix for problem drawing second level popup menus due to recent commit,

should find a better way to get this matrix for the UI.
This commit is contained in:
Brecht Van Lommel 2010-02-01 16:50:23 +00:00
parent 81cd4edfb6
commit 3aff6529c0

@ -131,12 +131,14 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4])
if(swin) { if(swin) {
/* used by UI, should find a better way to get the matrix there */ /* 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); wm_subwindow_getsize(win, swin->swinid, &width, &height);
glGetFloatv(GL_PROJECTION_MATRIX, (float*)viewmat); orthographic_m4(mat, -0.375, (float)width-0.375, -0.375, (float)height-0.375, -100, 100);
}
mul_m4_m4m4(mat, viewmat, winmat); else
glGetFloatv(GL_PROJECTION_MATRIX, (float*)mat);
} }
} }