[Bf-blender-cvs] [20a105d54c] blender2.8: Fix errors in new immediate mode for interface_widgets.c

Julian Eisel noreply at git.blender.org
Sun Feb 26 16:55:22 CET 2017


Commit: 20a105d54cc651190a9051a13c363b185f98d5e6
Author: Julian Eisel
Date:   Sun Feb 26 16:53:04 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB20a105d54cc651190a9051a13c363b185f98d5e6

Fix errors in new immediate mode for interface_widgets.c

Text editing cursor, text editing selection highlights and pie menu
direction indicator weren't visible.

Caused by rB4f2375b82f72.

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

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 0521e7d8c7..55253686a2 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1394,7 +1394,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
 
 				selwidth_draw = BLF_width(fstyle->uifont_id, drawstr + but->ofs, but->selend - but->ofs);
 
-				unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_INT, 2, KEEP_INT);
+				unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_INT, 2, CONVERT_INT_TO_FLOAT);
 				immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
 				immUniformColor4ubv((unsigned char *)wcol->item);
@@ -1426,7 +1426,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
 				t = 0;
 			}
 
-			unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_INT, 2, KEEP_INT);
+			unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_INT, 2, CONVERT_INT_TO_FLOAT);
 			immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
 			immUniformColor3f(0.2f, 0.6f, 0.9f);
@@ -4102,7 +4102,7 @@ void ui_draw_pie_center(uiBlock *block)
 			draw_disk_shaded(angle - range / 2.0f, range, pie_radius_internal, pie_radius_external, subd, col1, col2, true);
 		}
 		else {
-			draw_disk_shaded(angle - range / 2.0f, range, pie_radius_internal, pie_radius_external, subd, btheme->tui.wcol_pie_menu.inner, NULL, false);
+			draw_disk_shaded(angle - range / 2.0f, range, pie_radius_internal, pie_radius_external, subd, btheme->tui.wcol_pie_menu.inner_sel, NULL, false);
 		}
 	}




More information about the Bf-blender-cvs mailing list