Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_draw.c
| Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | |||||
| void ED_screen_draw_edges(wmWindow *win) | void ED_screen_draw_edges(wmWindow *win) | ||||
| { | { | ||||
| bScreen *screen = WM_window_get_active_screen(win); | bScreen *screen = WM_window_get_active_screen(win); | ||||
| const int winsize_x = WM_window_pixels_x(win); | const int winsize_x = WM_window_pixels_x(win); | ||||
| const int winsize_y = WM_window_pixels_y(win); | const int winsize_y = WM_window_pixels_y(win); | ||||
| ScrArea *sa; | ScrArea *sa; | ||||
| wmWindowViewport(win); | |||||
| unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); | unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | ||||
| /* Note: first loop only draws if U.pixelsize > 1, skip otherwise */ | /* Note: first loop only draws if U.pixelsize > 1, skip otherwise */ | ||||
| if (U.pixelsize > 1.0f) { | if (U.pixelsize > 1.0f) { | ||||
| /* FIXME: doesn't our glLineWidth already scale by U.pixelsize? */ | /* FIXME: doesn't our glLineWidth already scale by U.pixelsize? */ | ||||
| glLineWidth((2.0f * U.pixelsize) - 1); | glLineWidth((2.0f * U.pixelsize) - 1); | ||||
| immUniformThemeColor(TH_EDITOR_OUTLINE); | immUniformThemeColor(TH_EDITOR_OUTLINE); | ||||
| ▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines | |||||