[Bf-blender-cvs] [8c596e0] master: OpenGL: remove unneeded state changes

Mike Erwin noreply at git.blender.org
Fri Jan 22 08:52:46 CET 2016


Commit: 8c596e08e7b787782c91578ffd46c6ec8e409023
Author: Mike Erwin
Date:   Fri Jan 22 01:57:31 2016 -0500
Branches: master
https://developer.blender.org/rB8c596e08e7b787782c91578ffd46c6ec8e409023

OpenGL: remove unneeded state changes

UI_panel_category_draw_all was setting PolygonMode to LINES before
drawing LINES.

stitch_draw was setting PolygonMode to its default FILL value — any
function that deviates from the default should’ve changed it back to
FILL.

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

M	source/blender/editors/interface/interface_panel.c
M	source/blender/editors/uvedit/uvedit_smart_stitch.c

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

diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 8242d02..f5dc85c 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1761,7 +1761,6 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
 
 			/* tab outline */
 			glColor3ubv(theme_col_tab_outline);
-			glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
 			ui_panel_category_draw_tab(GL_LINE_STRIP, rct->xmin - px, rct->ymin - px, rct->xmax - px, rct->ymax + px,
 			                           tab_curve_radius, roundboxtype, true, true, NULL);
 			/* tab highlight (3d look) */
@@ -1771,8 +1770,6 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
 			                           tab_curve_radius, roundboxtype, true, false,
 			                           is_active ? theme_col_back : theme_col_tab_inactive);
 			glShadeModel(GL_FLAT);
-
-			glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 		}
 
 		/* tab blackline */
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index c9f4d27..65cb8a9 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1515,7 +1515,6 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar
 	glEnable(GL_BLEND);
 
 	UI_ThemeColor4(TH_STITCH_PREVIEW_ACTIVE);
-	glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 	glVertexPointer(2, GL_FLOAT, 0, stitch_preview->static_tris);
 	glDrawArrays(GL_TRIANGLES, 0, stitch_preview->num_static_tris * 3);




More information about the Bf-blender-cvs mailing list