Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area.c
| Context not available. | |||||
| BLI_rcti_init(&click_rect, x, x + icon_size, y, y + icon_size); | BLI_rcti_init(&click_rect, x, x + icon_size, y, y + icon_size); | ||||
| glColor4ub(255, 0, 0, alpha_debug); | VertexFormat* format = immVertexFormat(); | ||||
| fdrawbox(click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax); | unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); | ||||
| glColor4ub(0, 255, 255, alpha_debug); | |||||
| fdrawline(click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax); | immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR); | ||||
merwin: The immUniformColor calls only work with UNIFORM_COLOR shaders. Use different shader here. | |||||
| fdrawline(click_rect.xmin, click_rect.ymax, click_rect.xmax, click_rect.ymin); | |||||
| immUniformColor4ub(255, 0, 0, alpha_debug); | |||||
| imm_draw_line_box(pos, click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax); | |||||
| immUniformColor4ub(0, 255, 255, alpha_debug); | |||||
| imm_draw_line_box(pos, click_rect.xmin, click_rect.ymin, click_rect.xmax, click_rect.ymax); | |||||
Done Inline ActionsI'm not sure I understand why you replace fdrawline with imm_draw_line_box? krash: I'm not sure I understand why you replace fdrawline with imm_draw_line_box? | |||||
Done Inline ActionsGood catch @Anthony Edlin (krash). There is no replacement function for fdrawline, so expand these into Begin(LINES, 4) Vertex Vertex Vertex Vertex End merwin: Good catch @krash.
There is no replacement function for fdrawline, so expand these into
```… | |||||
| imm_draw_line_box(pos, click_rect.xmin, click_rect.ymax, click_rect.xmax, click_rect.ymin); | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
Done Inline ActionsUse UNIFORM_COLOR shader here. merwin: Use UNIFORM_COLOR shader here. | |||||
The immUniformColor calls only work with UNIFORM_COLOR shaders. Use different shader here.