[Bf-blender-cvs] [da24848fb45] blender2.8: OpenGL: remove UI_reinit_gl_state function

Mike Erwin noreply at git.blender.org
Fri Apr 7 21:11:53 CEST 2017


Commit: da24848fb45695365aaf79e577ee241a97188eb5
Author: Mike Erwin
Date:   Fri Apr 7 15:10:48 2017 -0400
Branches: blender2.8
https://developer.blender.org/rBda24848fb45695365aaf79e577ee241a97188eb5

OpenGL: remove UI_reinit_gl_state function

All line & point drawing is responsible for setting its own state (as of January 2016) making this redundant.

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

M	source/blender/editors/include/UI_interface.h
M	source/blender/editors/interface/interface_draw.c
M	source/blender/editors/space_api/spacetypes.c

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

diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index c0b457be918..75c28331c4b 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -793,7 +793,6 @@ void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers)
 void UI_init(void);
 void UI_init_userdef(void);
 void UI_reinit_font(void);
-void UI_reinit_gl_state(void);
 void UI_exit(void);
 
 /* Layout
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 5e4cb9c1ba1..3162584e910 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -2011,15 +2011,3 @@ void ui_draw_dropshadow(const rctf *rct, float radius, float aspect, float alpha
 	
 	glDisable(GL_BLEND);
 }
-
-/**
- * Reset GL state (keep minimal).
- *
- * \note Blender's internal code doesn't assume these are reset,
- * but external callbacks may depend on their state.
- */
-void UI_reinit_gl_state(void)
-{
-	glLineWidth(1.0f);
-	glPointSize(1.0f);
-}
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 5ff1d758563..4d601a31251 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -256,7 +256,6 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type)
 	
 	for (rdc = ar->type->drawcalls.first; rdc; rdc = rdc->next) {
 		if (rdc->type == type) {
-			UI_reinit_gl_state();
 			rdc->draw(C, ar, rdc->customdata);
 		}
 	}




More information about the Bf-blender-cvs mailing list