Commit: 6906a884eea23304cd6b9692bf50a18ab6330dc7
Author: Dalai Felinto
Date:   Tue Feb 14 14:35:18 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB6906a884eea23304cd6b9692bf50a18ab6330dc7

Immediate Mode: make triangles smooth again

Instead of bothering with matrix transformations, I am simply adding the jitter 
to the vertices.

Related to: rB31a21135cf72c8623be7f5aee2bfdac983ceae2e

===================================================================

M       source/blender/editors/interface/interface_widgets.c

===================================================================

diff --git a/source/blender/editors/interface/interface_widgets.c 
b/source/blender/editors/interface/interface_widgets.c
index bbb53324d3..08d1b69dd2 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -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();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to