OpenGL: remove fdrawcheckerboard
This helper function was marked DEPRECATED since it uses old OpenGL calls. Switched last 2 uses to imm_draw_checker_box, which does the same thing, only awesome. Part of T49043
This commit is contained in:
parent
a514fea932
commit
76c9f1a649
|
@ -49,8 +49,6 @@ struct ColorManagedDisplaySettings;
|
|||
|
||||
void fdrawline(float x1, float y1, float x2, float y2); /* DEPRECATED */
|
||||
|
||||
void fdrawcheckerboard(float x1, float y1, float x2, float y2); /* DEPRECATED */
|
||||
|
||||
/**
|
||||
* Draw a circle outline with the given \a radius.
|
||||
* The circle is centered at \a x, \a y and drawn in the XY plane.
|
||||
|
|
|
@ -62,22 +62,6 @@ void fdrawline(float x1, float y1, float x2, float y2)
|
|||
glEnd();
|
||||
}
|
||||
|
||||
void fdrawcheckerboard(float x1, float y1, float x2, float y2)
|
||||
{
|
||||
/* DEPRECATED: use imm_draw_checker_box instead */
|
||||
unsigned char col1[4] = {40, 40, 40}, col2[4] = {50, 50, 50};
|
||||
|
||||
glColor3ubv(col1);
|
||||
glRectf(x1, y1, x2, y2);
|
||||
glColor3ubv(col2);
|
||||
|
||||
GPU_basic_shader_bind(GPU_SHADER_STIPPLE | GPU_SHADER_USE_COLOR);
|
||||
GPU_basic_shader_stipple(GPU_SHADER_STIPPLE_CHECKER_8PX);
|
||||
glRectf(x1, y1, x2, y2);
|
||||
GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
|
||||
}
|
||||
|
||||
|
||||
/* ******************************************** */
|
||||
|
||||
void setlinestyle(int nr)
|
||||
|
|
|
@ -2218,7 +2218,7 @@ static bool view3d_main_region_draw_engine(const bContext *C, Scene *scene,
|
|||
if (v3d->flag & V3D_DISPBGPICS)
|
||||
view3d_draw_bgpic_test(scene, ar, v3d, false, true);
|
||||
else
|
||||
fdrawcheckerboard(0, 0, ar->winx, ar->winy);
|
||||
imm_draw_checker_box(0, 0, ar->winx, ar->winy);
|
||||
|
||||
/* render result draw */
|
||||
type = rv3d->render_engine->type;
|
||||
|
|
|
@ -318,7 +318,7 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
|
|||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
fdrawcheckerboard(offs_x, offs_y, offs_x + span_x, offs_y + span_y);
|
||||
imm_draw_checker_box(offs_x, offs_y, offs_x + span_x, offs_y + span_y);
|
||||
}
|
||||
|
||||
glRasterPos2f(offs_x + (ps->draw_flip[0] ? span_x : 0.0f),
|
||||
|
|
Loading…
Reference in New Issue