[Bf-blender-cvs] [feccadd] blender2.8: mark certain glutil functions as deprecated

Mike Erwin noreply at git.blender.org
Thu Nov 17 20:45:23 CET 2016


Commit: feccadd81b0862321aed81e1dd3aaa0fe1d72e8a
Author: Mike Erwin
Date:   Thu Nov 17 14:43:58 2016 -0500
Branches: blender2.8
https://developer.blender.org/rBfeccadd81b0862321aed81e1dd3aaa0fe1d72e8a

mark certain glutil functions as deprecated

These will be removed before we ship 2.8

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

M	source/blender/editors/include/BIF_glutil.h
M	source/blender/editors/screen/glutil.c

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

diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 7045340..e34d951 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -38,14 +38,23 @@ struct bContext;
 struct ColorManagedViewSettings;
 struct ColorManagedDisplaySettings;
 
-void fdrawline(float x1, float y1, float x2, float y2);
-void fdrawbox(float x1, float y1, float x2, float y2);
-void sdrawline(int x1, int y1, int x2, int y2);
-void sdrawbox(int x1, int y1, int x2, int y2);
+/* Several functions defined here are being DEPRECATED for Blender 2.8
+ *
+ * Do not use them in new code, and you are encouraged to
+ * convert existing code to draw without these.
+ *
+ * These will be deleted before we ship 2.8!
+ * - merwin
+ */
+
+void fdrawline(float x1, float y1, float x2, float y2); /* DEPRECATED */
+void fdrawbox(float x1, float y1, float x2, float y2); /* DEPRECATED */
+void sdrawline(int x1, int y1, int x2, int y2); /* DEPRECATED */
+void sdrawbox(int x1, int y1, int x2, int y2); /* DEPRECATED */
 
-void fdrawXORcirc(float xofs, float yofs, float rad);
+void fdrawXORcirc(float xofs, float yofs, float rad); /* DEPRECATED */
 
-void fdrawcheckerboard(float x1, float y1, float x2, float y2);
+void fdrawcheckerboard(float x1, float y1, float x2, float y2); /* DEPRECATED */
 
 /* OpenGL stipple defines */
 extern const unsigned char stipple_halftone[128];
@@ -65,7 +74,7 @@ extern const unsigned char stipple_checker_8px[128];
  * \param radius The arc radius.
  * \param nsegments The number of segments to use in drawing the arc.
  */
-void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments);
+void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments); /* DEPRECATED */
 
 /**
  * Draw a filled arc with the given \a radius,
@@ -78,7 +87,7 @@ void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments
  * \param radius The arc radius.
  * \param nsegments The number of segments to use in drawing the arc.
  */
-void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments);
+void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments); /* DEPRECATED */
 
 /**
  * Draw a circle outline with the given \a radius.
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index b64152b..3e19823 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -54,7 +54,7 @@
 #include "UI_interface.h"
 
 
-void fdrawline(float x1, float y1, float x2, float y2)
+void fdrawline(float x1, float y1, float x2, float y2) /* DEPRECATED */
 {
 	glBegin(GL_LINES);
 	glVertex2f(x1, y1);
@@ -75,7 +75,7 @@ void fdrawbox(float x1, float y1, float x2, float y2)
 	glEnd();
 }
 
-void fdrawcheckerboard(float x1, float y1, float x2, float y2)
+void fdrawcheckerboard(float x1, float y1, float x2, float y2) /* DEPRECATED */
 {
 	unsigned char col1[4] = {40, 40, 40}, col2[4] = {50, 50, 50};
 
@@ -89,7 +89,7 @@ void fdrawcheckerboard(float x1, float y1, float x2, float y2)
 	GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
 }
 
-void sdrawline(int x1, int y1, int x2, int y2)
+void sdrawline(int x1, int y1, int x2, int y2) /* DEPRECATED */
 {
 	glBegin(GL_LINES);
 	glVertex2i(x1, y1);




More information about the Bf-blender-cvs mailing list