Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_navigate_fly.c
| Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(region), void *arg) | ||||
| x1 = xoff + 0.45f * fly->width; | x1 = xoff + 0.45f * fly->width; | ||||
| y1 = yoff + 0.45f * fly->height; | y1 = yoff + 0.45f * fly->height; | ||||
| x2 = xoff + 0.55f * fly->width; | x2 = xoff + 0.55f * fly->width; | ||||
| y2 = yoff + 0.55f * fly->height; | y2 = yoff + 0.55f * fly->height; | ||||
| GPUVertFormat *format = immVertexFormat(); | GPUVertFormat *format = immVertexFormat(); | ||||
| uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); | ||||
| immUniformThemeColor3(TH_VIEW_OVERLAY); | immUniformThemeColor3(TH_VIEW_OVERLAY); | ||||
| immBegin(GPU_PRIM_LINES, 16); | immBegin(GPU_PRIM_LINES, 16); | ||||
| /* bottom left */ | /* bottom left */ | ||||
| immVertex2f(pos, x1, y1); | immVertex2f(pos, x1, y1); | ||||
| immVertex2f(pos, x1, y1 + 5); | immVertex2f(pos, x1, y1 + 5); | ||||
| ▲ Show 20 Lines • Show All 884 Lines • Show Last 20 Lines | |||||