Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_subwindow.c
| Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | void wm_subwindow_origin_get(wmWindow *win, int swinid, int *x, int *y) | ||||
| if (swin) { | if (swin) { | ||||
| wm_swin_origin_get(swin, x, y); | wm_swin_origin_get(swin, x, y); | ||||
| } | } | ||||
| } | } | ||||
| static void wm_swin_matrix_get(wmWindow *win, wmSubWindow *swin, float mat[4][4]) | static void wm_swin_matrix_get(wmWindow *win, wmSubWindow *swin, float mat[4][4]) | ||||
| { | { | ||||
| const bScreen *screen = WM_window_get_active_screen(win); | |||||
| /* 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 */ | ||||
| if (swin->swinid == win->screen->mainwin) { | if (swin->swinid == screen->mainwin) { | ||||
| int width, height; | int width, height; | ||||
| wm_swin_size_get(swin, &width, &height); | wm_swin_size_get(swin, &width, &height); | ||||
| orthographic_m4(mat, -GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS, -100, 100); | orthographic_m4(mat, -GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS, -100, 100); | ||||
| } | } | ||||
| else { | else { | ||||
| glGetFloatv(GL_PROJECTION_MATRIX, (float *)mat); | glGetFloatv(GL_PROJECTION_MATRIX, (float *)mat); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines | |||||