Immediate Mode: make triangles smooth again
Instead of bothering with matrix transformations, I am simply adding the jitter to the vertices. Related to: rB31a21135cf72c8623be7f5aee2bfdac983ceae2e
This commit is contained in:
parent
c80b760d4a
commit
6906a884ee
Notes:
blender-bot
2023-02-14 07:08:23 +01:00
Referenced by issue #50976, Blender UI problems with certain theme files
|
@ -206,12 +206,11 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y
|
|||
|
||||
/* for each AA step */
|
||||
for (int j = 0; j < WIDGET_AA_JITTER; j++) {
|
||||
glTranslate2fv(jit[j]);
|
||||
immVertex2fv(pos, tri_arr[0]);
|
||||
immVertex2fv(pos, tri_arr[1]);
|
||||
immVertex2fv(pos, tri_arr[2]);
|
||||
glTranslatef(-jit[j][0], -jit[j][1], 0.0f);
|
||||
immVertex2f(pos, tri_arr[0][0] + jit[j][0], tri_arr[0][1] + jit[j][1]);
|
||||
immVertex2f(pos, tri_arr[1][0] + jit[j][0], tri_arr[1][1] + jit[j][1]);
|
||||
immVertex2f(pos, tri_arr[2][0] + jit[j][0], tri_arr[2][1] + jit[j][1]);
|
||||
}
|
||||
|
||||
immEnd();
|
||||
|
||||
immUnbindProgram();
|
||||
|
|
Loading…
Reference in New Issue