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.
This commit is contained in:
2017-04-07 15:10:48 -04:00
parent 7a75581d92
commit da24848fb4
3 changed files with 0 additions and 14 deletions

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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);
}
}