[Bf-blender-cvs] [76c9f1a649] blender2.8: OpenGL: remove fdrawcheckerboard

Mike Erwin noreply at git.blender.org
Sat Mar 4 07:53:50 CET 2017


Commit: 76c9f1a649c19c117278615bf9e8000c595b0e36
Author: Mike Erwin
Date:   Sat Mar 4 01:49:07 2017 -0500
Branches: blender2.8
https://developer.blender.org/rB76c9f1a649c19c117278615bf9e8000c595b0e36

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

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

M	source/blender/editors/include/BIF_glutil.h
M	source/blender/editors/screen/glutil.c
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/windowmanager/intern/wm_playanim.c

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

diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index e67094027f..c3188b3793 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -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.
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 14fdcb1f72..dd06f3952a 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -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)
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 46b31948ce..9c94dfb1d0 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -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;
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 6bf7bcc293..75e82a1899 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -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),




More information about the Bf-blender-cvs mailing list